src/hotspot/share/code/compiledMethod.cpp
changeset 58226 408c445d04e8
parent 55293 d19dc5b10fbb
child 58679 9c3209ff7550
child 59056 15936b142f86
--- a/src/hotspot/share/code/compiledMethod.cpp	Thu Sep 19 09:50:11 2019 +0200
+++ b/src/hotspot/share/code/compiledMethod.cpp	Thu Sep 19 10:52:22 2019 +0200
@@ -104,6 +104,13 @@
 }
 
 //-----------------------------------------------------------------------------
+void CompiledMethod::mark_for_deoptimization(bool inc_recompile_counts) {
+  MutexLocker ml(CompiledMethod_lock->owned_by_self() ? NULL : CompiledMethod_lock,
+                 Mutex::_no_safepoint_check_flag);
+  _mark_for_deoptimization_status = (inc_recompile_counts ? deoptimize : deoptimize_noupdate);
+}
+
+//-----------------------------------------------------------------------------
 
 ExceptionCache* CompiledMethod::exception_cache_acquire() const {
   return OrderAccess::load_acquire(&_exception_cache);