Mercurial > hg > graal-jvmci-8
changeset 22466:5e61ca976049
documented other JVMCI-specific fields in JavaThread
author | Doug Simon <doug.simon@oracle.com> |
---|---|
date | Tue, 25 Aug 2015 15:01:40 +0200 |
parents | b14500c9da22 |
children | d1019456c4d2 a6adaf9c330d |
files | src/share/vm/runtime/deoptimization.cpp src/share/vm/runtime/thread.hpp |
diffstat | 2 files changed, 31 insertions(+), 20 deletions(-) [+] |
line wrap: on
line diff
--- a/src/share/vm/runtime/deoptimization.cpp Tue Aug 25 14:34:50 2015 +0200 +++ b/src/share/vm/runtime/deoptimization.cpp Tue Aug 25 15:01:40 2015 +0200 @@ -1474,33 +1474,31 @@ #if INCLUDE_JVMCI oop speculation = thread->pending_failed_speculation(); if (nm->is_compiled_by_jvmci()) { - if (speculation != NULL) { - oop speculation_log = nm->speculation_log(); - if (speculation_log != NULL) { - if (TraceDeoptimization || TraceUncollectedSpeculations) { - if (SpeculationLog::lastFailed(speculation_log) != NULL) { - tty->print_cr("A speculation that was not collected by the compiler is being overwritten"); + if (speculation != NULL) { + oop speculation_log = nm->speculation_log(); + if (speculation_log != NULL) { + if (TraceDeoptimization || TraceUncollectedSpeculations) { + if (SpeculationLog::lastFailed(speculation_log) != NULL) { + tty->print_cr("A speculation that was not collected by the compiler is being overwritten"); + } + } + if (TraceDeoptimization) { + tty->print_cr("Saving speculation to speculation log"); + } + SpeculationLog::set_lastFailed(speculation_log, speculation); + } else { + if (TraceDeoptimization) { + tty->print_cr("Speculation present but no speculation log"); } } - if (TraceDeoptimization) { - tty->print_cr("Saving speculation to speculation log"); - } - SpeculationLog::set_lastFailed(speculation_log, speculation); + thread->set_pending_failed_speculation(NULL); } else { if (TraceDeoptimization) { - tty->print_cr("Speculation present but no speculation log"); + tty->print_cr("No speculation"); } } - thread->set_pending_failed_speculation(NULL); } else { - if (TraceDeoptimization) { - tty->print_cr("No speculation"); - } - } - } else { -#ifdef ASSERT - assert(speculation == NULL, "There should not be a speculation for method compiled by other compilers"); -#endif + assert(speculation == NULL, "There should not be a speculation for method compiled by non-JVMCI compilers"); } if (trap_bci == SynchronizationEntryBCI) {
--- a/src/share/vm/runtime/thread.hpp Tue Aug 25 14:34:50 2015 +0200 +++ b/src/share/vm/runtime/thread.hpp Tue Aug 25 15:01:40 2015 +0200 @@ -917,10 +917,23 @@ private: #if INCLUDE_JVMCI + // The _pending_* fields below are used to communicate extra information + // from an uncommon trap in JVMCI compiled code to the uncommon trap handler. + + // Communicates the DeoptReason and DeoptAction of the uncommon trap int _pending_deoptimization; + + // An object that JVMCI compiled code can use to further describe and + // uniquely identify the speculative optimization guarded by the uncommon trap oop _pending_failed_speculation; + + // Specifies whether the uncommon trap is to bci 0 of a synchronized method + // before the monitor has been acquired. bool _pending_monitorenter; + + // Specifies if the DeoptReason for the last uncommon trap was Reason_transfer_to_interpreter bool _pending_transfer_to_interpreter; + // These fields are mutually exclusive in terms of live ranges // so this could be a union instead of a struct. struct {