diff src/share/vm/runtime/deoptimization.cpp @ 8506:c3657d00e343

-Merge with tip
author Christos Kotselidis <christos.kotselidis@oracle.com>
date Thu, 21 Mar 2013 14:11:13 +0100
parents 6b6cbd8b8914
children 9f9aaa65294e
line wrap: on
line diff
--- a/src/share/vm/runtime/deoptimization.cpp	Thu Mar 21 11:30:38 2013 +0100
+++ b/src/share/vm/runtime/deoptimization.cpp	Thu Mar 21 14:11:13 2013 +0100
@@ -1312,24 +1312,14 @@
     
     if (TraceDeoptimization) {
       tty->print_cr("  bci=%d pc=%d, relative_pc=%d, method=%s", trap_scope->bci(), fr.pc(), fr.pc() - nm->code_begin(), trap_scope->method()->name()->as_C_string());
-#ifdef GRAAL
-      if (thread->graal_deopt_info() != NULL) {
-        oop deopt_info = thread->graal_deopt_info();
-        if (java_lang_String::is_instance(deopt_info)) {
-          char buf[O_BUFLEN];
-          java_lang_String::as_utf8_string(deopt_info, buf, O_BUFLEN);
-          tty->print_cr("deopt info: %s", buf);
-        } else {
-          tty->print_cr("deopt info:");
-          deopt_info->print();
-        }
-        thread->set_graal_deopt_info(NULL);
-      }
-#endif
     }
 
     methodHandle    trap_method = trap_scope->method();
     int             trap_bci    = trap_scope->bci();
+    if (trap_bci == SynchronizationEntryBCI) {
+      trap_bci = 0;
+      Thread::current()->set_pending_monitorenter(true);
+    }
     Bytecodes::Code trap_bc     = trap_method->java_code_at(trap_bci);
 
     if (trap_scope->rethrow_exception()) {
@@ -1339,7 +1329,7 @@
       GrowableArray<ScopeValue*>* expressions = trap_scope->expressions();
       guarantee(expressions != NULL, "must have exception to throw");
       ScopeValue* topOfStack = expressions->top();
-      Handle topOfStackObj = cvf->create_stack_value(topOfStack)->get_obj();
+      Handle topOfStackObj = StackValue::create_stack_value(&fr, &reg_map, topOfStack)->get_obj();
       THREAD->set_pending_exception(topOfStackObj(), NULL, 0);
     }
     
@@ -1637,7 +1627,7 @@
         if (trap_method() == nm->method()) {
           make_not_compilable = true;
         } else {
-          trap_method->set_not_compilable(CompLevel_full_optimization);
+          trap_method->set_not_compilable(CompLevel_full_optimization, true, "overflow_recompile_count > PerBytecodeRecompilationCutoff");
           // But give grace to the enclosing nm->method().
         }
       }