diff src/share/vm/graal/graalCompiler.cpp @ 3619:5e9645341ec3

support for new RiRuntime features: add code without making it the default for the method, executing Java tasks on the compile thread, communicate nmethod reference to Java code as HotSpotCompiledMethod
author Lukas Stadler <lukas.stadler@jku.at>
date Wed, 09 Nov 2011 11:27:38 +0100
parents ff472e09af46
children 136ea96eb7f8
line wrap: on
line diff
--- a/src/share/vm/graal/graalCompiler.cpp	Tue Oct 25 14:44:32 2011 +0200
+++ b/src/share/vm/graal/graalCompiler.cpp	Wed Nov 09 11:27:38 2011 +0100
@@ -264,3 +264,22 @@
   return T_ILLEGAL;
 }
 
+void GraalCompiler::poll_java_queue() {
+  int system_dictionary_modification_counter;
+  {
+    MutexLocker locker(Compile_lock, Thread::current());
+    system_dictionary_modification_counter = SystemDictionary::number_of_modifications();
+  }
+
+  {
+    ThreadToNativeFromVM ttn(JavaThread::current());
+    ciEnv ci_env(NULL, system_dictionary_modification_counter);
+    {
+      VM_ENTRY_MARK;
+      ResourceMark rm;
+      HandleMark hm;
+
+      VMExits::pollJavaQueue();
+    }
+  }
+}