src/hotspot/share/runtime/deoptimization.cpp
changeset 50858 2d3e99a72541
parent 50623 5209d8a6303e
child 51073 34696f3aa22b
equal deleted inserted replaced
50857:a9938374a9f4 50858:2d3e99a72541
  1545     }
  1545     }
  1546 
  1546 
  1547     methodHandle    trap_method = trap_scope->method();
  1547     methodHandle    trap_method = trap_scope->method();
  1548     int             trap_bci    = trap_scope->bci();
  1548     int             trap_bci    = trap_scope->bci();
  1549 #if INCLUDE_JVMCI
  1549 #if INCLUDE_JVMCI
  1550     oop speculation = thread->pending_failed_speculation();
  1550     long speculation = thread->pending_failed_speculation();
  1551     if (nm->is_compiled_by_jvmci()) {
  1551     if (nm->is_compiled_by_jvmci()) {
  1552       if (speculation != NULL) {
  1552       if (speculation != 0) {
  1553         oop speculation_log = nm->as_nmethod()->speculation_log();
  1553         oop speculation_log = nm->as_nmethod()->speculation_log();
  1554         if (speculation_log != NULL) {
  1554         if (speculation_log != NULL) {
  1555           if (TraceDeoptimization || TraceUncollectedSpeculations) {
  1555           if (TraceDeoptimization || TraceUncollectedSpeculations) {
  1556             if (HotSpotSpeculationLog::lastFailed(speculation_log) != NULL) {
  1556             if (HotSpotSpeculationLog::lastFailed(speculation_log) != 0) {
  1557               tty->print_cr("A speculation that was not collected by the compiler is being overwritten");
  1557               tty->print_cr("A speculation that was not collected by the compiler is being overwritten");
  1558             }
  1558             }
  1559           }
  1559           }
  1560           if (TraceDeoptimization) {
  1560           if (TraceDeoptimization) {
  1561             tty->print_cr("Saving speculation to speculation log");
  1561             tty->print_cr("Saving speculation to speculation log");
  1564         } else {
  1564         } else {
  1565           if (TraceDeoptimization) {
  1565           if (TraceDeoptimization) {
  1566             tty->print_cr("Speculation present but no speculation log");
  1566             tty->print_cr("Speculation present but no speculation log");
  1567           }
  1567           }
  1568         }
  1568         }
  1569         thread->set_pending_failed_speculation(NULL);
  1569         thread->set_pending_failed_speculation(0);
  1570       } else {
  1570       } else {
  1571         if (TraceDeoptimization) {
  1571         if (TraceDeoptimization) {
  1572           tty->print_cr("No speculation");
  1572           tty->print_cr("No speculation");
  1573         }
  1573         }
  1574       }
  1574       }
  1575     } else {
  1575     } else {
  1576       assert(speculation == NULL, "There should not be a speculation for method compiled by non-JVMCI compilers");
  1576       assert(speculation == 0, "There should not be a speculation for method compiled by non-JVMCI compilers");
  1577     }
  1577     }
  1578 
  1578 
  1579     if (trap_bci == SynchronizationEntryBCI) {
  1579     if (trap_bci == SynchronizationEntryBCI) {
  1580       trap_bci = 0;
  1580       trap_bci = 0;
  1581       thread->set_pending_monitorenter(true);
  1581       thread->set_pending_monitorenter(true);