8232791: Shenandoah: passive mode should disable pacing
authorshade
Tue, 22 Oct 2019 18:53:22 +0200
changeset 58740 259b54092265
parent 58739 2b0c5800fb1c
child 58741 62e16c1e0f66
8232791: Shenandoah: passive mode should disable pacing Reviewed-by: zgu
src/hotspot/share/gc/shenandoah/heuristics/shenandoahPassiveHeuristics.cpp
src/hotspot/share/gc/shenandoah/heuristics/shenandoahPassiveHeuristics.hpp
--- a/src/hotspot/share/gc/shenandoah/heuristics/shenandoahPassiveHeuristics.cpp	Tue Oct 22 09:20:21 2019 -0700
+++ b/src/hotspot/share/gc/shenandoah/heuristics/shenandoahPassiveHeuristics.cpp	Tue Oct 22 18:53:22 2019 +0200
@@ -29,6 +29,11 @@
 #include "logging/log.hpp"
 #include "logging/logTag.hpp"
 
+ShenandoahPassiveHeuristics::ShenandoahPassiveHeuristics() : ShenandoahHeuristics() {
+  // Passive runs with max speed for allocation, because GC is always STW
+  SHENANDOAH_ERGO_DISABLE_FLAG(ShenandoahPacing);
+}
+
 bool ShenandoahPassiveHeuristics::should_start_gc() const {
   // Never do concurrent GCs.
   return false;
--- a/src/hotspot/share/gc/shenandoah/heuristics/shenandoahPassiveHeuristics.hpp	Tue Oct 22 09:20:21 2019 -0700
+++ b/src/hotspot/share/gc/shenandoah/heuristics/shenandoahPassiveHeuristics.hpp	Tue Oct 22 18:53:22 2019 +0200
@@ -28,7 +28,9 @@
 
 class ShenandoahPassiveHeuristics : public ShenandoahHeuristics {
 public:
-   virtual bool should_start_gc() const;
+  ShenandoahPassiveHeuristics();
+
+  virtual bool should_start_gc() const;
 
   virtual bool should_process_references();