src/hotspot/share/gc/g1/g1YoungRemSetSamplingThread.cpp
changeset 54645 05aaccf7d558
parent 54623 1126f0607c70
child 54786 ebf733a324d4
equal deleted inserted replaced
54644:8d52b4c6f9d8 54645:05aaccf7d558
    45   set_name("G1 Young RemSet Sampling");
    45   set_name("G1 Young RemSet Sampling");
    46   create_and_start();
    46   create_and_start();
    47 }
    47 }
    48 
    48 
    49 void G1YoungRemSetSamplingThread::sleep_before_next_cycle() {
    49 void G1YoungRemSetSamplingThread::sleep_before_next_cycle() {
    50   MutexLocker x(&_monitor, Mutex::_no_safepoint_check_flag);
    50   MonitorLocker ml(&_monitor, Mutex::_no_safepoint_check_flag);
    51   if (!should_terminate()) {
    51   if (!should_terminate()) {
    52     uintx waitms = G1ConcRefinementServiceIntervalMillis;
    52     uintx waitms = G1ConcRefinementServiceIntervalMillis;
    53     _monitor.wait_without_safepoint_check(waitms);
    53     ml.wait(waitms);
    54   }
    54   }
    55 }
    55 }
    56 
    56 
    57 bool G1YoungRemSetSamplingThread::should_start_periodic_gc() {
    57 bool G1YoungRemSetSamplingThread::should_start_periodic_gc() {
    58   // If we are currently in a concurrent mark we are going to uncommit memory soon.
    58   // If we are currently in a concurrent mark we are going to uncommit memory soon.