src/share/vm/runtime/deoptimization.cpp
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File 8031320_9 Cdiff src/share/vm/runtime/deoptimization.cpp

src/share/vm/runtime/deoptimization.cpp

Print this page

        

*** 1286,1296 **** // Record this event in the histogram. gather_statistics(reason, action, trap_bc); // Ensure that we can record deopt. history: ! bool create_if_missing = ProfileTraps; MethodData* trap_mdo = get_method_data(thread, trap_method, create_if_missing); // Log a message --- 1286,1297 ---- // Record this event in the histogram. gather_statistics(reason, action, trap_bc); // Ensure that we can record deopt. history: ! // Need MDO to record RTM code generation state. ! bool create_if_missing = ProfileTraps RTM_OPT_ONLY( || UseRTMLocking ); MethodData* trap_mdo = get_method_data(thread, trap_method, create_if_missing); // Log a message
*** 1567,1576 **** --- 1568,1588 ---- int tstate0 = pdata->trap_state(); int tstate1 = trap_state_set_recompiled(tstate0, true); if (tstate1 != tstate0) pdata->set_trap_state(tstate1); } + + #if INCLUDE_RTM_OPT + // Restart collecting RTM locking abort statistic if the method + // is recompiled for a reason other than RTM state change. + // Assume that in new recompiled code the statistic could be different, + // for example, due to different inlining. + if ((reason != Reason_rtm_state_change) && (trap_mdo != NULL) && + UseRTMDeopt && (nm->rtm_state() != ProfileRTM)) { + trap_mdo->atomic_set_rtm_state(ProfileRTM); + } + #endif } if (inc_recompile_count) { trap_mdo->inc_overflow_recompile_count(); if ((uint)trap_mdo->overflow_recompile_count() >
*** 1824,1834 **** "constraint", "div0_check", "age", "predicate", "loop_limit_check", ! "speculate_class_check" }; const char* Deoptimization::_trap_action_name[Action_LIMIT] = { // Note: Keep this in sync. with enum DeoptAction. "none", "maybe_recompile", --- 1836,1847 ---- "constraint", "div0_check", "age", "predicate", "loop_limit_check", ! "speculate_class_check", ! "rtm_state_change" }; const char* Deoptimization::_trap_action_name[Action_LIMIT] = { // Note: Keep this in sync. with enum DeoptAction. "none", "maybe_recompile",
src/share/vm/runtime/deoptimization.cpp
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File