There was an error while loading. Please reload this page.
1 parent 07bb0e3 commit 533211aCopy full SHA for 533211a
src/hotspot/share/jfr/support/jfrThreadLocal.cpp
@@ -45,6 +45,7 @@
45
#include "runtime/os.hpp"
46
#include "runtime/threadIdentifier.hpp"
47
#include "utilities/sizes.hpp"
48
+#include "utilities/spinYield.hpp"
49
50
JfrThreadLocal::JfrThreadLocal() :
51
_sample_request(),
@@ -600,7 +601,10 @@ bool JfrThreadLocal::try_acquire_cpu_time_jfr_dequeue_lock() {
600
601
}
602
603
void JfrThreadLocal::acquire_cpu_time_jfr_dequeue_lock() {
- while (Atomic::cmpxchg(&_cpu_time_jfr_locked, UNLOCKED, DEQUEUE) != UNLOCKED);
604
+ SpinYield s;
605
+ while (Atomic::cmpxchg(&_cpu_time_jfr_locked, UNLOCKED, DEQUEUE) != UNLOCKED) {
606
+ s.wait();
607
+ }
608
609
610
void JfrThreadLocal::release_cpu_time_jfr_queue_lock() {
0 commit comments