< prev index next >
src/hotspot/share/gc/z/zDirector.cpp
Print this page
@@ -73,21 +73,21 @@
// Perform GC if heap usage passes 10/20/30% and no other GC has been
// performed yet. This allows us to get some early samples of the GC
// duration, which is needed by the other rules.
const size_t max_capacity = ZHeap::heap()->soft_max_capacity();
const size_t used = ZHeap::heap()->used();
- const double used_threshold_percent = (ZStatCycle::ncycles() + 1) * 0.1;
+ const double used_threshold_percent = (ZStatCycle::nwarmup_cycles() + 1) * 0.1;
const size_t used_threshold = max_capacity * used_threshold_percent;
log_debug(gc, director)("Rule: Warmup %.0f%%, Used: " SIZE_FORMAT "MB, UsedThreshold: " SIZE_FORMAT "MB",
used_threshold_percent * 100, used / M, used_threshold / M);
return used >= used_threshold;
}
bool ZDirector::rule_allocation_rate() const {
- if (ZStatCycle::is_first()) {
+ if (!ZStatCycle::is_normalized_duration_trustable()) {
// Rule disabled
return false;
}
// Perform GC if the estimated max allocation rate indicates that we
< prev index next >