# HG changeset patch # User Tom Rodriguez # Date 1418852388 28800 # Node ID 37a5c6b8b930f9464e75c50b5ae30acf00f180ed # Parent 88c280297bd2305ba5a69a9c63740de84bd48536 Log deopt before deoptimizing the frame diff -r 88c280297bd2 -r 37a5c6b8b930 src/share/vm/runtime/deoptimization.cpp --- a/src/share/vm/runtime/deoptimization.cpp Thu Dec 18 13:10:23 2014 +1000 +++ b/src/share/vm/runtime/deoptimization.cpp Wed Dec 17 13:39:48 2014 -0800 @@ -1228,17 +1228,12 @@ gather_statistics(reason, Action_none, Bytecodes::_illegal); - // Patch the nmethod so that when execution returns to it we will - // deopt the execution state and return to the interpreter. - fr.deoptimize(thread); - if (LogCompilation && xtty != NULL) { nmethod* nm = fr.cb()->as_nmethod_or_null(); assert(nm != NULL, "only nmethods can deopt"); ttyLocker ttyl; - xtty->begin_head("deoptimized thread='" UINTX_FORMAT "' compile_id='%d'", - thread->osthread()->thread_id(), nm != NULL ? nm->compile_id() : -1); + xtty->begin_head("deoptimized thread='" UINTX_FORMAT "'", thread->osthread()->thread_id()); nm->log_identity(xtty); xtty->end_head(); for (ScopeDesc* sd = nm->scope_desc_at(fr.pc()); ; sd = sd->sender()) { @@ -1249,6 +1244,10 @@ } xtty->tail("deoptimized"); } + + // Patch the nmethod so that when execution returns to it we will + // deopt the execution state and return to the interpreter. + fr.deoptimize(thread); } void Deoptimization::deoptimize(JavaThread* thread, frame fr, RegisterMap *map) {