src/hotspot/share/gc/shenandoah/shenandoahPacer.cpp
branchdatagramsocketimpl-branch
changeset 58678 9cf78a70fa4f
parent 54833 76751d3faf7b
child 58679 9c3209ff7550
--- a/src/hotspot/share/gc/shenandoah/shenandoahPacer.cpp	Thu Oct 17 20:27:44 2019 +0100
+++ b/src/hotspot/share/gc/shenandoah/shenandoahPacer.cpp	Thu Oct 17 20:53:35 2019 +0100
@@ -70,9 +70,12 @@
 
   restart_with(non_taxable, tax);
 
-  log_info(gc, ergo)("Pacer for Mark. Expected Live: " SIZE_FORMAT "M, Free: " SIZE_FORMAT
-                     "M, Non-Taxable: " SIZE_FORMAT "M, Alloc Tax Rate: %.1fx",
-                     live / M, free / M, non_taxable / M, tax);
+  log_info(gc, ergo)("Pacer for Mark. Expected Live: " SIZE_FORMAT "%s, Free: " SIZE_FORMAT "%s, "
+                     "Non-Taxable: " SIZE_FORMAT "%s, Alloc Tax Rate: %.1fx",
+                     byte_size_in_proper_unit(live),        proper_unit_for_byte_size(live),
+                     byte_size_in_proper_unit(free),        proper_unit_for_byte_size(free),
+                     byte_size_in_proper_unit(non_taxable), proper_unit_for_byte_size(non_taxable),
+                     tax);
 }
 
 void ShenandoahPacer::setup_for_evac() {
@@ -91,9 +94,12 @@
 
   restart_with(non_taxable, tax);
 
-  log_info(gc, ergo)("Pacer for Evacuation. Used CSet: " SIZE_FORMAT "M, Free: " SIZE_FORMAT
-                     "M, Non-Taxable: " SIZE_FORMAT "M, Alloc Tax Rate: %.1fx",
-                     used / M, free / M, non_taxable / M, tax);
+  log_info(gc, ergo)("Pacer for Evacuation. Used CSet: " SIZE_FORMAT "%s, Free: " SIZE_FORMAT "%s, "
+                     "Non-Taxable: " SIZE_FORMAT "%s, Alloc Tax Rate: %.1fx",
+                     byte_size_in_proper_unit(used),        proper_unit_for_byte_size(used),
+                     byte_size_in_proper_unit(free),        proper_unit_for_byte_size(free),
+                     byte_size_in_proper_unit(non_taxable), proper_unit_for_byte_size(non_taxable),
+                     tax);
 }
 
 void ShenandoahPacer::setup_for_updaterefs() {
@@ -112,9 +118,12 @@
 
   restart_with(non_taxable, tax);
 
-  log_info(gc, ergo)("Pacer for Update Refs. Used: " SIZE_FORMAT "M, Free: " SIZE_FORMAT
-                     "M, Non-Taxable: " SIZE_FORMAT "M, Alloc Tax Rate: %.1fx",
-                     used / M, free / M, non_taxable / M, tax);
+  log_info(gc, ergo)("Pacer for Update Refs. Used: " SIZE_FORMAT "%s, Free: " SIZE_FORMAT "%s, "
+                     "Non-Taxable: " SIZE_FORMAT "%s, Alloc Tax Rate: %.1fx",
+                     byte_size_in_proper_unit(used),        proper_unit_for_byte_size(used),
+                     byte_size_in_proper_unit(free),        proper_unit_for_byte_size(free),
+                     byte_size_in_proper_unit(non_taxable), proper_unit_for_byte_size(non_taxable),
+                     tax);
 }
 
 /*
@@ -136,9 +145,12 @@
 
   restart_with(non_taxable, tax);
 
-  log_info(gc, ergo)("Pacer for Traversal. Expected Live: " SIZE_FORMAT "M, Free: " SIZE_FORMAT
-                     "M, Non-Taxable: " SIZE_FORMAT "M, Alloc Tax Rate: %.1fx",
-                     live / M, free / M, non_taxable / M, tax);
+  log_info(gc, ergo)("Pacer for Traversal. Expected Live: " SIZE_FORMAT "%s, Free: " SIZE_FORMAT "%s, "
+                     "Non-Taxable: " SIZE_FORMAT "%s, Alloc Tax Rate: %.1fx",
+                     byte_size_in_proper_unit(live),        proper_unit_for_byte_size(live),
+                     byte_size_in_proper_unit(free),        proper_unit_for_byte_size(free),
+                     byte_size_in_proper_unit(non_taxable), proper_unit_for_byte_size(non_taxable),
+                     tax);
 }
 
 /*
@@ -158,8 +170,9 @@
 
   restart_with(initial, tax);
 
-  log_info(gc, ergo)("Pacer for Idle. Initial: " SIZE_FORMAT "M, Alloc Tax Rate: %.1fx",
-                     initial / M, tax);
+  log_info(gc, ergo)("Pacer for Idle. Initial: " SIZE_FORMAT "%s, Alloc Tax Rate: %.1fx",
+                     byte_size_in_proper_unit(initial), proper_unit_for_byte_size(initial),
+                     tax);
 }
 
 size_t ShenandoahPacer::update_and_get_progress_history() {
@@ -242,7 +255,7 @@
     }
     cur = MAX2<size_t>(1, cur);
 
-    os::sleep(Thread::current(), cur, true);
+    JavaThread::current()->sleep(cur);
 
     double end = os::elapsedTime();
     total = (size_t)((end - start) * 1000);