< prev index next >

src/share/vm/runtime/deoptimization.cpp

Print this page




1444     ScopeDesc*      trap_scope  = cvf->scope();
1445 
1446     if (TraceDeoptimization) {
1447       ttyLocker ttyl;
1448       tty->print_cr("  bci=%d pc=" INTPTR_FORMAT ", relative_pc=" INTPTR_FORMAT ", method=%s" JVMCI_ONLY(", debug_id=%d"), trap_scope->bci(), p2i(fr.pc()), fr.pc() - nm->code_begin(), trap_scope->method()->name_and_sig_as_C_string()
1449 #if INCLUDE_JVMCI
1450           , debug_id
1451 #endif
1452           );
1453     }
1454 
1455     methodHandle    trap_method = trap_scope->method();
1456     int             trap_bci    = trap_scope->bci();
1457 #if INCLUDE_JVMCI
1458     oop speculation = thread->pending_failed_speculation();
1459     if (nm->is_compiled_by_jvmci()) {
1460       if (speculation != NULL) {
1461         oop speculation_log = nm->speculation_log();
1462         if (speculation_log != NULL) {
1463           if (TraceDeoptimization || TraceUncollectedSpeculations) {
1464             if (SpeculationLog::lastFailed(speculation_log) != NULL) {
1465               tty->print_cr("A speculation that was not collected by the compiler is being overwritten");
1466             }
1467           }
1468           if (TraceDeoptimization) {
1469             tty->print_cr("Saving speculation to speculation log");
1470           }
1471           SpeculationLog::set_lastFailed(speculation_log, speculation);
1472         } else {
1473           if (TraceDeoptimization) {
1474             tty->print_cr("Speculation present but no speculation log");
1475           }
1476         }
1477         thread->set_pending_failed_speculation(NULL);
1478       } else {
1479         if (TraceDeoptimization) {
1480           tty->print_cr("No speculation");
1481         }
1482       }
1483     } else {
1484       assert(speculation == NULL, "There should not be a speculation for method compiled by non-JVMCI compilers");
1485     }
1486 
1487     if (trap_bci == SynchronizationEntryBCI) {
1488       trap_bci = 0;
1489       thread->set_pending_monitorenter(true);
1490     }
1491 




1444     ScopeDesc*      trap_scope  = cvf->scope();
1445 
1446     if (TraceDeoptimization) {
1447       ttyLocker ttyl;
1448       tty->print_cr("  bci=%d pc=" INTPTR_FORMAT ", relative_pc=" INTPTR_FORMAT ", method=%s" JVMCI_ONLY(", debug_id=%d"), trap_scope->bci(), p2i(fr.pc()), fr.pc() - nm->code_begin(), trap_scope->method()->name_and_sig_as_C_string()
1449 #if INCLUDE_JVMCI
1450           , debug_id
1451 #endif
1452           );
1453     }
1454 
1455     methodHandle    trap_method = trap_scope->method();
1456     int             trap_bci    = trap_scope->bci();
1457 #if INCLUDE_JVMCI
1458     oop speculation = thread->pending_failed_speculation();
1459     if (nm->is_compiled_by_jvmci()) {
1460       if (speculation != NULL) {
1461         oop speculation_log = nm->speculation_log();
1462         if (speculation_log != NULL) {
1463           if (TraceDeoptimization || TraceUncollectedSpeculations) {
1464             if (HotSpotSpeculationLog::lastFailed(speculation_log) != NULL) {
1465               tty->print_cr("A speculation that was not collected by the compiler is being overwritten");
1466             }
1467           }
1468           if (TraceDeoptimization) {
1469             tty->print_cr("Saving speculation to speculation log");
1470           }
1471           HotSpotSpeculationLog::set_lastFailed(speculation_log, speculation);
1472         } else {
1473           if (TraceDeoptimization) {
1474             tty->print_cr("Speculation present but no speculation log");
1475           }
1476         }
1477         thread->set_pending_failed_speculation(NULL);
1478       } else {
1479         if (TraceDeoptimization) {
1480           tty->print_cr("No speculation");
1481         }
1482       }
1483     } else {
1484       assert(speculation == NULL, "There should not be a speculation for method compiled by non-JVMCI compilers");
1485     }
1486 
1487     if (trap_bci == SynchronizationEntryBCI) {
1488       trap_bci = 0;
1489       thread->set_pending_monitorenter(true);
1490     }
1491 


< prev index next >