< prev index next >

src/hotspot/share/gc/shenandoah/shenandoahHeuristics.hpp

Print this page
rev 58150 : 8239904: Shenandoah: accumulated penalties should not be over 100% of capacity
Reviewed-by: XXX

@@ -65,11 +65,11 @@
 
 class ShenandoahCollectionSet;
 class ShenandoahHeapRegion;
 
 class ShenandoahHeuristics : public CHeapObj<mtGC> {
-  static const intx Concurrent_Adjust   =  1; // recover from penalties
+  static const intx Concurrent_Adjust   = -1; // recover from penalties
   static const intx Degenerated_Penalty = 10; // how much to penalize average GC duration history on Degenerated GC
   static const intx Full_Penalty        = 20; // how much to penalize average GC duration history on Full GC
 
 protected:
   typedef struct {

@@ -91,11 +91,11 @@
 
   double _cycle_start;
   double _last_cycle_end;
 
   size_t _gc_times_learned;
-  size_t _gc_time_penalties;
+  intx _gc_time_penalties;
   TruncatedSeq* _gc_time_history;
 
   // There may be many threads that contend to set this flag
   ShenandoahSharedFlag _metaspace_oom;
 

@@ -108,10 +108,12 @@
 
   virtual void choose_collection_set_from_regiondata(ShenandoahCollectionSet* set,
                                                      RegionData* data, size_t data_size,
                                                      size_t free) = 0;
 
+  void adjust_penalty(intx step);
+
 public:
   ShenandoahHeuristics();
   virtual ~ShenandoahHeuristics();
 
   void record_gc_start();
< prev index next >