diff src/share/vm/compiler/compileBroker.cpp @ 19321:98592ae4b1fa

only record method dependencies if JVMTI hotswapping or breakpointing is enabled don't verify dependencies if the SystemDictionary was not updated during compilation
author Doug Simon <doug.simon@oracle.com>
date Thu, 12 Feb 2015 16:54:12 +0100
parents ab47ef2f2207
children c3d9637c98ed
line wrap: on
line diff
--- a/src/share/vm/compiler/compileBroker.cpp	Thu Feb 12 15:20:14 2015 +0100
+++ b/src/share/vm/compiler/compileBroker.cpp	Thu Feb 12 16:54:12 2015 +0100
@@ -1987,6 +1987,11 @@
   int compilable = ciEnv::MethodCompilable;
   AbstractCompiler *comp = compiler(task_level);
 
+  int system_dictionary_modification_counter;
+  {
+    MutexLocker locker(Compile_lock, thread);
+    system_dictionary_modification_counter = SystemDictionary::number_of_modifications();
+  }
 #ifdef COMPILERGRAAL
   if (comp != NULL && comp->is_graal()) {
     GraalCompiler* graal = (GraalCompiler*) comp;
@@ -1994,17 +1999,13 @@
     TraceTime t1("compilation", &time);
     EventCompilation event;
 
-    graal->compile_method(target_handle, osr_bci, task);
+    GraalEnv env(task, system_dictionary_modification_counter);
+    graal->compile_method(target_handle, osr_bci, &env);
 
     post_compile(thread, task, event, task->code() != NULL, NULL);
   } else
 #endif // COMPILERGRAAL
   {
-    int system_dictionary_modification_counter;
-    {
-      MutexLocker locker(Compile_lock, thread);
-      system_dictionary_modification_counter = SystemDictionary::number_of_modifications();
-    }
 
     NoHandleMark  nhm;
     ThreadToNativeFromVM ttn(thread);