50 char _pad0[DEFAULT_CACHE_LINE_SIZE];
51 volatile intptr_t _budget;
52 char _pad1[DEFAULT_CACHE_LINE_SIZE];
53 volatile intptr_t _progress;
54 char _pad2[DEFAULT_CACHE_LINE_SIZE];
55
56 public:
57 ShenandoahPacer(ShenandoahHeap* heap) :
58 _heap(heap),
59 _progress_history(new TruncatedSeq(5)),
60 _epoch(0),
61 _tax_rate(1),
62 _budget(0),
63 _progress(PACING_PROGRESS_UNINIT) {
64 }
65
66 void setup_for_idle();
67 void setup_for_mark();
68 void setup_for_evac();
69 void setup_for_updaterefs();
70
71 inline void report_mark(size_t words);
72 inline void report_evac(size_t words);
73 inline void report_updaterefs(size_t words);
74
75 inline void report_alloc(size_t words);
76
77 bool claim_for_alloc(size_t words, bool force);
78 void pace_for_alloc(size_t words);
79 void unpace_for_alloc(intptr_t epoch, size_t words);
80
81 intptr_t epoch();
82
83 void print_on(outputStream* out) const;
84
85 private:
86 inline void report_internal(size_t words);
87 inline void report_progress_internal(size_t words);
88
89 void restart_with(jlong non_taxable_bytes, jdouble tax_rate);
|
50 char _pad0[DEFAULT_CACHE_LINE_SIZE];
51 volatile intptr_t _budget;
52 char _pad1[DEFAULT_CACHE_LINE_SIZE];
53 volatile intptr_t _progress;
54 char _pad2[DEFAULT_CACHE_LINE_SIZE];
55
56 public:
57 ShenandoahPacer(ShenandoahHeap* heap) :
58 _heap(heap),
59 _progress_history(new TruncatedSeq(5)),
60 _epoch(0),
61 _tax_rate(1),
62 _budget(0),
63 _progress(PACING_PROGRESS_UNINIT) {
64 }
65
66 void setup_for_idle();
67 void setup_for_mark();
68 void setup_for_evac();
69 void setup_for_updaterefs();
70 void setup_for_traversal();
71
72 inline void report_mark(size_t words);
73 inline void report_evac(size_t words);
74 inline void report_updaterefs(size_t words);
75
76 inline void report_alloc(size_t words);
77
78 bool claim_for_alloc(size_t words, bool force);
79 void pace_for_alloc(size_t words);
80 void unpace_for_alloc(intptr_t epoch, size_t words);
81
82 intptr_t epoch();
83
84 void print_on(outputStream* out) const;
85
86 private:
87 inline void report_internal(size_t words);
88 inline void report_progress_internal(size_t words);
89
90 void restart_with(jlong non_taxable_bytes, jdouble tax_rate);
|