< prev index next >
src/hotspot/share/trace/tracingExport.cpp
Print this page
rev 49501 : 8200374: Add ThreadsSMRSupport::verify_hazard_pointer_scanned() to verify threads_do().
rev 49502 : Add missing NULL check; use proper lock-free get/set with TracingExport::_sampler_thread.
rev 49503 : Rename TracingExport::get_sampler_thread() to TracingExport::sampler_thread_acquire() and TracingExport::set_sampler_thread() to TracingExport::set_sampler_thread_with_lock(); set_sampler_thread_with_lock() uses Threads_lock toavoid conflicts with Thread-SMR scans.
*** 24,38 ****
#include "precompiled.hpp"
#include "runtime/orderAccess.inline.hpp"
#include "trace/tracingExport.hpp"
! // Allow lock-free access to _sampler_thread.
Thread* volatile TracingExport::_sampler_thread = NULL;
! Thread* TracingExport::get_sampler_thread() {
return (Thread*)OrderAccess::load_acquire(&_sampler_thread);
}
! void TracingExport::set_sampler_thread(Thread* thread) {
! OrderAccess::release_store_fence(&_sampler_thread, thread);
}
--- 24,40 ----
#include "precompiled.hpp"
#include "runtime/orderAccess.inline.hpp"
#include "trace/tracingExport.hpp"
! // Allow lock-free reads of _sampler_thread.
Thread* volatile TracingExport::_sampler_thread = NULL;
! Thread* TracingExport::sampler_thread_acquire() {
return (Thread*)OrderAccess::load_acquire(&_sampler_thread);
}
! void TracingExport::set_sampler_thread_with_lock(Thread* thread) {
! // Grab Threads_lock to avoid conflicts with Thread-SMR scans.
! MutexLocker ml(Threads_lock);
! _sampler_thread = thread;
}
< prev index next >