src/hotspot/share/prims/whitebox.cpp
changeset 58226 408c445d04e8
parent 57876 30db6422848b
child 58375 a1eba2e37671
--- a/src/hotspot/share/prims/whitebox.cpp	Thu Sep 19 09:50:11 2019 +0200
+++ b/src/hotspot/share/prims/whitebox.cpp	Thu Sep 19 10:52:22 2019 +0200
@@ -820,10 +820,8 @@
 WB_END
 
 WB_ENTRY(void, WB_DeoptimizeAll(JNIEnv* env, jobject o))
-  MutexLocker mu(Compile_lock);
   CodeCache::mark_all_nmethods_for_deoptimization();
-  VM_Deoptimize op;
-  VMThread::execute(&op);
+  Deoptimization::deoptimize_all_marked();
 WB_END
 
 WB_ENTRY(jint, WB_DeoptimizeMethod(JNIEnv* env, jobject o, jobject method, jboolean is_osr))
@@ -840,8 +838,7 @@
   }
   result += CodeCache::mark_for_deoptimization(mh());
   if (result > 0) {
-    VM_Deoptimize op;
-    VMThread::execute(&op);
+    Deoptimization::deoptimize_all_marked();
   }
   return result;
 WB_END