Mercurial > hg > truffle
comparison src/share/vm/runtime/deoptimization.cpp @ 17783:85b20fdf2d24
Merge
author | kvn |
---|---|
date | Tue, 25 Mar 2014 11:38:48 -0700 |
parents | 606acabe7b5c |
children | 62c54fcc0a35 |
comparison
equal
deleted
inserted
replaced
17779:794399f4f5d9 | 17783:85b20fdf2d24 |
---|---|
1283 | 1283 |
1284 // Record this event in the histogram. | 1284 // Record this event in the histogram. |
1285 gather_statistics(reason, action, trap_bc); | 1285 gather_statistics(reason, action, trap_bc); |
1286 | 1286 |
1287 // Ensure that we can record deopt. history: | 1287 // Ensure that we can record deopt. history: |
1288 bool create_if_missing = ProfileTraps; | 1288 // Need MDO to record RTM code generation state. |
1289 bool create_if_missing = ProfileTraps RTM_OPT_ONLY( || UseRTMLocking ); | |
1289 | 1290 |
1290 MethodData* trap_mdo = | 1291 MethodData* trap_mdo = |
1291 get_method_data(thread, trap_method, create_if_missing); | 1292 get_method_data(thread, trap_method, create_if_missing); |
1292 | 1293 |
1293 // Log a message | 1294 // Log a message |
1564 int tstate0 = pdata->trap_state(); | 1565 int tstate0 = pdata->trap_state(); |
1565 int tstate1 = trap_state_set_recompiled(tstate0, true); | 1566 int tstate1 = trap_state_set_recompiled(tstate0, true); |
1566 if (tstate1 != tstate0) | 1567 if (tstate1 != tstate0) |
1567 pdata->set_trap_state(tstate1); | 1568 pdata->set_trap_state(tstate1); |
1568 } | 1569 } |
1570 | |
1571 #if INCLUDE_RTM_OPT | |
1572 // Restart collecting RTM locking abort statistic if the method | |
1573 // is recompiled for a reason other than RTM state change. | |
1574 // Assume that in new recompiled code the statistic could be different, | |
1575 // for example, due to different inlining. | |
1576 if ((reason != Reason_rtm_state_change) && (trap_mdo != NULL) && | |
1577 UseRTMDeopt && (nm->rtm_state() != ProfileRTM)) { | |
1578 trap_mdo->atomic_set_rtm_state(ProfileRTM); | |
1579 } | |
1580 #endif | |
1569 } | 1581 } |
1570 | 1582 |
1571 if (inc_recompile_count) { | 1583 if (inc_recompile_count) { |
1572 trap_mdo->inc_overflow_recompile_count(); | 1584 trap_mdo->inc_overflow_recompile_count(); |
1573 if ((uint)trap_mdo->overflow_recompile_count() > | 1585 if ((uint)trap_mdo->overflow_recompile_count() > |
1821 "constraint", | 1833 "constraint", |
1822 "div0_check", | 1834 "div0_check", |
1823 "age", | 1835 "age", |
1824 "predicate", | 1836 "predicate", |
1825 "loop_limit_check", | 1837 "loop_limit_check", |
1826 "speculate_class_check" | 1838 "speculate_class_check", |
1839 "rtm_state_change" | |
1827 }; | 1840 }; |
1828 const char* Deoptimization::_trap_action_name[Action_LIMIT] = { | 1841 const char* Deoptimization::_trap_action_name[Action_LIMIT] = { |
1829 // Note: Keep this in sync. with enum DeoptAction. | 1842 // Note: Keep this in sync. with enum DeoptAction. |
1830 "none", | 1843 "none", |
1831 "maybe_recompile", | 1844 "maybe_recompile", |