< prev index next >

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

Print this page
rev 60420 : imported patch 8248401-Refactor-unify-RMI-gc-support-functionality

*** 54,71 **** ml.wait(waitms); } } bool G1YoungRemSetSamplingThread::should_start_periodic_gc() { // If we are currently in a concurrent mark we are going to uncommit memory soon. ! if (G1CollectedHeap::heap()->concurrent_mark()->cm_thread()->during_cycle()) { log_debug(gc, periodic)("Concurrent cycle in progress. Skipping."); return false; } // Check if enough time has passed since the last GC. ! uintx time_since_last_gc = (uintx)Universe::heap()->millis_since_last_gc(); if ((time_since_last_gc < G1PeriodicGCInterval)) { log_debug(gc, periodic)("Last GC occurred " UINTX_FORMAT "ms before which is below threshold " UINTX_FORMAT "ms. Skipping.", time_since_last_gc, G1PeriodicGCInterval); return false; } --- 54,72 ---- ml.wait(waitms); } } bool G1YoungRemSetSamplingThread::should_start_periodic_gc() { + G1CollectedHeap* g1h = G1CollectedHeap::heap(); // If we are currently in a concurrent mark we are going to uncommit memory soon. ! if (g1h->concurrent_mark()->cm_thread()->during_cycle()) { log_debug(gc, periodic)("Concurrent cycle in progress. Skipping."); return false; } // Check if enough time has passed since the last GC. ! uintx time_since_last_gc = (uintx)g1h->time_since_last_collection().milliseconds(); if ((time_since_last_gc < G1PeriodicGCInterval)) { log_debug(gc, periodic)("Last GC occurred " UINTX_FORMAT "ms before which is below threshold " UINTX_FORMAT "ms. Skipping.", time_since_last_gc, G1PeriodicGCInterval); return false; }
< prev index next >