< prev index next >

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

Print this page
rev 58164 : 8240076: Shenandoah: pacer should cover reset and preclean phases
Reviewed-by: XXX


  57   // Heavily updated, protect from accidental false sharing
  58   DEFINE_PAD_MINUS_SIZE(2, DEFAULT_CACHE_LINE_SIZE, sizeof(volatile intptr_t));
  59   volatile intptr_t _progress;
  60   DEFINE_PAD_MINUS_SIZE(3, DEFAULT_CACHE_LINE_SIZE, 0);
  61 
  62 public:
  63   ShenandoahPacer(ShenandoahHeap* heap) :
  64           _heap(heap),
  65           _progress_history(new TruncatedSeq(5)),
  66           _epoch(0),
  67           _tax_rate(1),
  68           _budget(0),
  69           _progress(PACING_PROGRESS_UNINIT) {}
  70 
  71   void setup_for_idle();
  72   void setup_for_mark();
  73   void setup_for_evac();
  74   void setup_for_updaterefs();
  75   void setup_for_traversal();
  76 



  77   inline void report_mark(size_t words);
  78   inline void report_evac(size_t words);
  79   inline void report_updaterefs(size_t words);
  80 
  81   inline void report_alloc(size_t words);
  82 
  83   bool claim_for_alloc(size_t words, bool force);
  84   void pace_for_alloc(size_t words);
  85   void unpace_for_alloc(intptr_t epoch, size_t words);
  86 
  87   intptr_t epoch();
  88 
  89   void print_on(outputStream* out) const;
  90 
  91 private:
  92   inline void report_internal(size_t words);
  93   inline void report_progress_internal(size_t words);
  94 
  95   void restart_with(size_t non_taxable_bytes, double tax_rate);
  96 


  57   // Heavily updated, protect from accidental false sharing
  58   DEFINE_PAD_MINUS_SIZE(2, DEFAULT_CACHE_LINE_SIZE, sizeof(volatile intptr_t));
  59   volatile intptr_t _progress;
  60   DEFINE_PAD_MINUS_SIZE(3, DEFAULT_CACHE_LINE_SIZE, 0);
  61 
  62 public:
  63   ShenandoahPacer(ShenandoahHeap* heap) :
  64           _heap(heap),
  65           _progress_history(new TruncatedSeq(5)),
  66           _epoch(0),
  67           _tax_rate(1),
  68           _budget(0),
  69           _progress(PACING_PROGRESS_UNINIT) {}
  70 
  71   void setup_for_idle();
  72   void setup_for_mark();
  73   void setup_for_evac();
  74   void setup_for_updaterefs();
  75   void setup_for_traversal();
  76 
  77   void setup_for_reset();
  78   void setup_for_preclean();
  79 
  80   inline void report_mark(size_t words);
  81   inline void report_evac(size_t words);
  82   inline void report_updaterefs(size_t words);
  83 
  84   inline void report_alloc(size_t words);
  85 
  86   bool claim_for_alloc(size_t words, bool force);
  87   void pace_for_alloc(size_t words);
  88   void unpace_for_alloc(intptr_t epoch, size_t words);
  89 
  90   intptr_t epoch();
  91 
  92   void print_on(outputStream* out) const;
  93 
  94 private:
  95   inline void report_internal(size_t words);
  96   inline void report_progress_internal(size_t words);
  97 
  98   void restart_with(size_t non_taxable_bytes, double tax_rate);
  99 
< prev index next >