1323 xtty->begin_head("uncommon_trap thread='" UINTX_FORMAT"' %s",
1324 os::current_thread_id(),
1325 format_trap_request(buf, sizeof(buf), trap_request));
1326 nm->log_identity(xtty);
1327 }
1328 Symbol* class_name = NULL;
1329 bool unresolved = false;
1330 if (unloaded_class_index >= 0) {
1331 constantPoolHandle constants (THREAD, trap_method->constants());
1332 if (constants->tag_at(unloaded_class_index).is_unresolved_klass()) {
1333 class_name = constants->klass_name_at(unloaded_class_index);
1334 unresolved = true;
1335 if (xtty != NULL)
1336 xtty->print(" unresolved='1'");
1337 } else if (constants->tag_at(unloaded_class_index).is_symbol()) {
1338 class_name = constants->symbol_at(unloaded_class_index);
1339 }
1340 if (xtty != NULL)
1341 xtty->name(class_name);
1342 }
1343 if (xtty != NULL && trap_mdo != NULL) {
1344 // Dump the relevant MDO state.
1345 // This is the deopt count for the current reason, any previous
1346 // reasons or recompiles seen at this point.
1347 int dcnt = trap_mdo->trap_count(reason);
1348 if (dcnt != 0)
1349 xtty->print(" count='%d'", dcnt);
1350 ProfileData* pdata = trap_mdo->bci_to_data(trap_bci);
1351 int dos = (pdata == NULL)? 0: pdata->trap_state();
1352 if (dos != 0) {
1353 xtty->print(" state='%s'", format_trap_state(buf, sizeof(buf), dos));
1354 if (trap_state_is_recompiled(dos)) {
1355 int recnt2 = trap_mdo->overflow_recompile_count();
1356 if (recnt2 != 0)
1357 xtty->print(" recompiles2='%d'", recnt2);
1358 }
1359 }
1360 }
1361 if (xtty != NULL) {
1362 xtty->stamp();
1363 xtty->end_head();
1822 // Note: Keep this in sync. with enum DeoptReason.
1823 "none",
1824 "null_check",
1825 "null_assert",
1826 "range_check",
1827 "class_check",
1828 "array_check",
1829 "intrinsic",
1830 "bimorphic",
1831 "unloaded",
1832 "uninitialized",
1833 "unreached",
1834 "unhandled",
1835 "constraint",
1836 "div0_check",
1837 "age",
1838 "predicate",
1839 "loop_limit_check",
1840 "speculate_class_check",
1841 "speculate_null_check",
1842 "rtm_state_change"
1843 };
1844 const char* Deoptimization::_trap_action_name[Action_LIMIT] = {
1845 // Note: Keep this in sync. with enum DeoptAction.
1846 "none",
1847 "maybe_recompile",
1848 "reinterpret",
1849 "make_not_entrant",
1850 "make_not_compilable"
1851 };
1852
1853 const char* Deoptimization::trap_reason_name(int reason) {
1854 if (reason == Reason_many) return "many";
1855 if ((uint)reason < Reason_LIMIT)
1856 return _trap_reason_name[reason];
1857 static char buf[20];
1858 sprintf(buf, "reason%d", reason);
1859 return buf;
1860 }
1861 const char* Deoptimization::trap_action_name(int action) {
1862 if ((uint)action < Action_LIMIT)
|
1323 xtty->begin_head("uncommon_trap thread='" UINTX_FORMAT"' %s",
1324 os::current_thread_id(),
1325 format_trap_request(buf, sizeof(buf), trap_request));
1326 nm->log_identity(xtty);
1327 }
1328 Symbol* class_name = NULL;
1329 bool unresolved = false;
1330 if (unloaded_class_index >= 0) {
1331 constantPoolHandle constants (THREAD, trap_method->constants());
1332 if (constants->tag_at(unloaded_class_index).is_unresolved_klass()) {
1333 class_name = constants->klass_name_at(unloaded_class_index);
1334 unresolved = true;
1335 if (xtty != NULL)
1336 xtty->print(" unresolved='1'");
1337 } else if (constants->tag_at(unloaded_class_index).is_symbol()) {
1338 class_name = constants->symbol_at(unloaded_class_index);
1339 }
1340 if (xtty != NULL)
1341 xtty->name(class_name);
1342 }
1343 if (xtty != NULL && trap_mdo != NULL && reason < MethodData::_trap_hist_limit) {
1344 // Dump the relevant MDO state.
1345 // This is the deopt count for the current reason, any previous
1346 // reasons or recompiles seen at this point.
1347 int dcnt = trap_mdo->trap_count(reason);
1348 if (dcnt != 0)
1349 xtty->print(" count='%d'", dcnt);
1350 ProfileData* pdata = trap_mdo->bci_to_data(trap_bci);
1351 int dos = (pdata == NULL)? 0: pdata->trap_state();
1352 if (dos != 0) {
1353 xtty->print(" state='%s'", format_trap_state(buf, sizeof(buf), dos));
1354 if (trap_state_is_recompiled(dos)) {
1355 int recnt2 = trap_mdo->overflow_recompile_count();
1356 if (recnt2 != 0)
1357 xtty->print(" recompiles2='%d'", recnt2);
1358 }
1359 }
1360 }
1361 if (xtty != NULL) {
1362 xtty->stamp();
1363 xtty->end_head();
1822 // Note: Keep this in sync. with enum DeoptReason.
1823 "none",
1824 "null_check",
1825 "null_assert",
1826 "range_check",
1827 "class_check",
1828 "array_check",
1829 "intrinsic",
1830 "bimorphic",
1831 "unloaded",
1832 "uninitialized",
1833 "unreached",
1834 "unhandled",
1835 "constraint",
1836 "div0_check",
1837 "age",
1838 "predicate",
1839 "loop_limit_check",
1840 "speculate_class_check",
1841 "speculate_null_check",
1842 "rtm_state_change",
1843 "tenured"
1844 };
1845 const char* Deoptimization::_trap_action_name[Action_LIMIT] = {
1846 // Note: Keep this in sync. with enum DeoptAction.
1847 "none",
1848 "maybe_recompile",
1849 "reinterpret",
1850 "make_not_entrant",
1851 "make_not_compilable"
1852 };
1853
1854 const char* Deoptimization::trap_reason_name(int reason) {
1855 if (reason == Reason_many) return "many";
1856 if ((uint)reason < Reason_LIMIT)
1857 return _trap_reason_name[reason];
1858 static char buf[20];
1859 sprintf(buf, "reason%d", reason);
1860 return buf;
1861 }
1862 const char* Deoptimization::trap_action_name(int action) {
1863 if ((uint)action < Action_LIMIT)
|