< prev index next >

src/hotspot/share/gc/g1/g1YoungRemSetSamplingThread.cpp

Print this page

        

*** 30,40 **** #include "gc/g1/g1Policy.hpp" #include "gc/g1/g1YoungRemSetSamplingThread.hpp" #include "gc/g1/heapRegion.inline.hpp" #include "gc/g1/heapRegionRemSet.hpp" #include "gc/shared/suspendibleThreadSet.hpp" - #include "memory/universe.hpp" #include "runtime/mutexLocker.hpp" G1YoungRemSetSamplingThread::G1YoungRemSetSamplingThread() : ConcurrentGCThread(), _monitor(Mutex::nonleaf, --- 30,39 ----
*** 46,59 **** set_name("G1 Young RemSet Sampling"); create_and_start(); } void G1YoungRemSetSamplingThread::sleep_before_next_cycle() { ! MonitorLocker ml(&_monitor, Mutex::_no_safepoint_check_flag); if (!should_terminate()) { uintx waitms = G1ConcRefinementServiceIntervalMillis; ! ml.wait(waitms); } } bool G1YoungRemSetSamplingThread::should_start_periodic_gc() { // If we are currently in a concurrent mark we are going to uncommit memory soon. --- 45,58 ---- set_name("G1 Young RemSet Sampling"); create_and_start(); } void G1YoungRemSetSamplingThread::sleep_before_next_cycle() { ! MutexLockerEx x(&_monitor, Mutex::_no_safepoint_check_flag); if (!should_terminate()) { uintx waitms = G1ConcRefinementServiceIntervalMillis; ! _monitor.wait(Mutex::_no_safepoint_check_flag, waitms); } } bool G1YoungRemSetSamplingThread::should_start_periodic_gc() { // If we are currently in a concurrent mark we are going to uncommit memory soon.
*** 123,133 **** sleep_before_next_cycle(); } } void G1YoungRemSetSamplingThread::stop_service() { ! MutexLocker x(&_monitor, Mutex::_no_safepoint_check_flag); _monitor.notify(); } class G1YoungRemSetSamplingClosure : public HeapRegionClosure { SuspendibleThreadSetJoiner* _sts; --- 122,132 ---- sleep_before_next_cycle(); } } void G1YoungRemSetSamplingThread::stop_service() { ! MutexLockerEx x(&_monitor, Mutex::_no_safepoint_check_flag); _monitor.notify(); } class G1YoungRemSetSamplingClosure : public HeapRegionClosure { SuspendibleThreadSetJoiner* _sts;
*** 164,174 **** void G1YoungRemSetSamplingThread::sample_young_list_rs_lengths() { SuspendibleThreadSetJoiner sts; G1CollectedHeap* g1h = G1CollectedHeap::heap(); G1Policy* policy = g1h->policy(); ! if (policy->use_adaptive_young_list_length()) { G1YoungRemSetSamplingClosure cl(&sts); G1CollectionSet* g1cs = g1h->collection_set(); g1cs->iterate(&cl); --- 163,173 ---- void G1YoungRemSetSamplingThread::sample_young_list_rs_lengths() { SuspendibleThreadSetJoiner sts; G1CollectedHeap* g1h = G1CollectedHeap::heap(); G1Policy* policy = g1h->policy(); ! if (policy->adaptive_young_list_length()) { G1YoungRemSetSamplingClosure cl(&sts); G1CollectionSet* g1cs = g1h->collection_set(); g1cs->iterate(&cl);
< prev index next >