< prev index next >

src/hotspot/share/gc/z/zDirector.cpp

Print this page

        

*** 64,74 **** // Perform GC if timer has expired. const double time_since_last_gc = ZStatCycle::time_since_last(); const double time_until_gc = ZCollectionInterval - time_since_last_gc; ! log_debug(gc, director)("Rule: Timer, Interval: %us, TimeUntilGC: %.3lfs", ZCollectionInterval, time_until_gc); return time_until_gc <= 0; } --- 64,74 ---- // Perform GC if timer has expired. const double time_since_last_gc = ZStatCycle::time_since_last(); const double time_until_gc = ZCollectionInterval - time_since_last_gc; ! log_debug(gc, director)("Rule: Timer, Interval: %us, TimeUntilGC: %.3fs", ZCollectionInterval, time_until_gc); return time_until_gc <= 0; }
*** 131,141 **** // We also deduct the sample interval, so that we don't overshoot the target // time and end up starting the GC too late in the next interval. const double sample_interval = 1.0 / ZStatAllocRate::sample_hz; const double time_until_gc = time_until_oom - max_duration_of_gc - sample_interval; ! log_debug(gc, director)("Rule: Allocation Rate, MaxAllocRate: %.3lfMB/s, Free: " SIZE_FORMAT "MB, MaxDurationOfGC: %.3lfs, TimeUntilGC: %.3lfs", max_alloc_rate / M, free / M, max_duration_of_gc, time_until_gc); return time_until_gc <= 0; } --- 131,141 ---- // We also deduct the sample interval, so that we don't overshoot the target // time and end up starting the GC too late in the next interval. const double sample_interval = 1.0 / ZStatAllocRate::sample_hz; const double time_until_gc = time_until_oom - max_duration_of_gc - sample_interval; ! log_debug(gc, director)("Rule: Allocation Rate, MaxAllocRate: %.3fMB/s, Free: " SIZE_FORMAT "MB, MaxDurationOfGC: %.3fs, TimeUntilGC: %.3fs", max_alloc_rate / M, free / M, max_duration_of_gc, time_until_gc); return time_until_gc <= 0; }
*** 160,170 **** const size_t used = ZHeap::heap()->used(); const double time_since_last_gc = ZStatCycle::time_since_last(); const double time_since_last_gc_threshold = 5 * 60; // 5 minutes if (used < used_threshold && time_since_last_gc < time_since_last_gc_threshold) { // Don't even consider doing a proactive GC ! log_debug(gc, director)("Rule: Proactive, UsedUntilEnabled: " SIZE_FORMAT "MB, TimeUntilEnabled: %.3lfs", (used_threshold - used) / M, time_since_last_gc_threshold - time_since_last_gc); return false; } --- 160,170 ---- const size_t used = ZHeap::heap()->used(); const double time_since_last_gc = ZStatCycle::time_since_last(); const double time_since_last_gc_threshold = 5 * 60; // 5 minutes if (used < used_threshold && time_since_last_gc < time_since_last_gc_threshold) { // Don't even consider doing a proactive GC ! log_debug(gc, director)("Rule: Proactive, UsedUntilEnabled: " SIZE_FORMAT "MB, TimeUntilEnabled: %.3fs", (used_threshold - used) / M, time_since_last_gc_threshold - time_since_last_gc); return false; }
*** 173,183 **** const AbsSeq& duration_of_gc = ZStatCycle::normalized_duration(); const double max_duration_of_gc = duration_of_gc.davg() + (duration_of_gc.dsd() * one_in_1000); const double acceptable_gc_interval = max_duration_of_gc * ((assumed_throughput_drop_during_gc / acceptable_throughput_drop) - 1.0); const double time_until_gc = acceptable_gc_interval - time_since_last_gc; ! log_debug(gc, director)("Rule: Proactive, AcceptableGCInterval: %.3lfs, TimeSinceLastGC: %.3lfs, TimeUntilGC: %.3lfs", acceptable_gc_interval, time_since_last_gc, time_until_gc); return time_until_gc <= 0; } --- 173,183 ---- const AbsSeq& duration_of_gc = ZStatCycle::normalized_duration(); const double max_duration_of_gc = duration_of_gc.davg() + (duration_of_gc.dsd() * one_in_1000); const double acceptable_gc_interval = max_duration_of_gc * ((assumed_throughput_drop_during_gc / acceptable_throughput_drop) - 1.0); const double time_until_gc = acceptable_gc_interval - time_since_last_gc; ! log_debug(gc, director)("Rule: Proactive, AcceptableGCInterval: %.3fs, TimeSinceLastGC: %.3fs, TimeUntilGC: %.3fs", acceptable_gc_interval, time_since_last_gc, time_until_gc); return time_until_gc <= 0; }
*** 196,206 **** const size_t used = ZHeap::heap()->used(); const size_t free_with_reserve = max_capacity - used; const size_t free = free_with_reserve - MIN2(free_with_reserve, max_reserve); const double free_percent = percent_of(free, max_capacity); ! log_debug(gc, director)("Rule: High Usage, Free: " SIZE_FORMAT "MB(%.1lf%%)", free / M, free_percent); return free_percent <= 5.0; } --- 196,206 ---- const size_t used = ZHeap::heap()->used(); const size_t free_with_reserve = max_capacity - used; const size_t free = free_with_reserve - MIN2(free_with_reserve, max_reserve); const double free_percent = percent_of(free, max_capacity); ! log_debug(gc, director)("Rule: High Usage, Free: " SIZE_FORMAT "MB(%.1f%%)", free / M, free_percent); return free_percent <= 5.0; }
< prev index next >