changeset 55780:07ff89762205

8225340: ZGC: Add logging of High Usage rule Reviewed-by: stefank, eosterlund
author pliden
date Fri, 07 Jun 2019 11:19:34 +0200
parents eaa1e236f305
children 4556dd808daa
files src/hotspot/share/gc/z/zDirector.cpp
diffstat 1 files changed, 5 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/hotspot/share/gc/z/zDirector.cpp	Fri Jun 07 10:13:30 2019 +0200
+++ b/src/hotspot/share/gc/z/zDirector.cpp	Fri Jun 07 11:19:34 2019 +0200
@@ -196,8 +196,12 @@
   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);
 
-  return percent_of(free, max_capacity) <= 5.0;
+  log_debug(gc, director)("Rule: High Usage, Free: " SIZE_FORMAT "MB(%.1lf%%)",
+                          free / M, free_percent);
+
+  return free_percent <= 5.0;
 }
 
 GCCause::Cause ZDirector::make_gc_decision() const {