equal
deleted
inserted
replaced
1286 |
1286 |
1287 // Record this event in the histogram. |
1287 // Record this event in the histogram. |
1288 gather_statistics(reason, action, trap_bc); |
1288 gather_statistics(reason, action, trap_bc); |
1289 |
1289 |
1290 // Ensure that we can record deopt. history: |
1290 // Ensure that we can record deopt. history: |
1291 bool create_if_missing = ProfileTraps; |
1291 // Need MDO to record RTM code generation state. |
|
1292 bool create_if_missing = ProfileTraps RTM_OPT_ONLY( || UseRTMLocking ); |
1292 |
1293 |
1293 MethodData* trap_mdo = |
1294 MethodData* trap_mdo = |
1294 get_method_data(thread, trap_method, create_if_missing); |
1295 get_method_data(thread, trap_method, create_if_missing); |
1295 |
1296 |
1296 // Log a message |
1297 // Log a message |
1567 int tstate0 = pdata->trap_state(); |
1568 int tstate0 = pdata->trap_state(); |
1568 int tstate1 = trap_state_set_recompiled(tstate0, true); |
1569 int tstate1 = trap_state_set_recompiled(tstate0, true); |
1569 if (tstate1 != tstate0) |
1570 if (tstate1 != tstate0) |
1570 pdata->set_trap_state(tstate1); |
1571 pdata->set_trap_state(tstate1); |
1571 } |
1572 } |
|
1573 |
|
1574 #if INCLUDE_RTM_OPT |
|
1575 // Restart collecting RTM locking abort statistic if the method |
|
1576 // is recompiled for a reason other than RTM state change. |
|
1577 // Assume that in new recompiled code the statistic could be different, |
|
1578 // for example, due to different inlining. |
|
1579 if ((reason != Reason_rtm_state_change) && (trap_mdo != NULL) && |
|
1580 UseRTMDeopt && (nm->rtm_state() != ProfileRTM)) { |
|
1581 trap_mdo->atomic_set_rtm_state(ProfileRTM); |
|
1582 } |
|
1583 #endif |
1572 } |
1584 } |
1573 |
1585 |
1574 if (inc_recompile_count) { |
1586 if (inc_recompile_count) { |
1575 trap_mdo->inc_overflow_recompile_count(); |
1587 trap_mdo->inc_overflow_recompile_count(); |
1576 if ((uint)trap_mdo->overflow_recompile_count() > |
1588 if ((uint)trap_mdo->overflow_recompile_count() > |
1824 "constraint", |
1836 "constraint", |
1825 "div0_check", |
1837 "div0_check", |
1826 "age", |
1838 "age", |
1827 "predicate", |
1839 "predicate", |
1828 "loop_limit_check", |
1840 "loop_limit_check", |
1829 "speculate_class_check" |
1841 "speculate_class_check", |
|
1842 "rtm_state_change" |
1830 }; |
1843 }; |
1831 const char* Deoptimization::_trap_action_name[Action_LIMIT] = { |
1844 const char* Deoptimization::_trap_action_name[Action_LIMIT] = { |
1832 // Note: Keep this in sync. with enum DeoptAction. |
1845 // Note: Keep this in sync. with enum DeoptAction. |
1833 "none", |
1846 "none", |
1834 "maybe_recompile", |
1847 "maybe_recompile", |