8240076: Shenandoah: pacer should cover reset and preclean phases
Reviewed-by: zgu
This commit is contained in:
parent
d26dadef43
commit
6913bbc200
@ -1814,10 +1814,16 @@ void ShenandoahHeap::op_roots() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void ShenandoahHeap::op_reset() {
|
void ShenandoahHeap::op_reset() {
|
||||||
|
if (ShenandoahPacing) {
|
||||||
|
pacer()->setup_for_reset();
|
||||||
|
}
|
||||||
reset_mark_bitmap();
|
reset_mark_bitmap();
|
||||||
}
|
}
|
||||||
|
|
||||||
void ShenandoahHeap::op_preclean() {
|
void ShenandoahHeap::op_preclean() {
|
||||||
|
if (ShenandoahPacing) {
|
||||||
|
pacer()->setup_for_preclean();
|
||||||
|
}
|
||||||
concurrent_mark()->preclean_weak_refs();
|
concurrent_mark()->preclean_weak_refs();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -177,6 +177,31 @@ void ShenandoahPacer::setup_for_idle() {
|
|||||||
tax);
|
tax);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* There is no useful notion of progress for these operations. To avoid stalling
|
||||||
|
* the allocators unnecessarily, allow them to run unimpeded.
|
||||||
|
*/
|
||||||
|
|
||||||
|
void ShenandoahPacer::setup_for_preclean() {
|
||||||
|
assert(ShenandoahPacing, "Only be here when pacing is enabled");
|
||||||
|
|
||||||
|
size_t initial = _heap->max_capacity();
|
||||||
|
restart_with(initial, 1.0);
|
||||||
|
|
||||||
|
log_info(gc, ergo)("Pacer for Precleaning. Non-Taxable: " SIZE_FORMAT "%s",
|
||||||
|
byte_size_in_proper_unit(initial), proper_unit_for_byte_size(initial));
|
||||||
|
}
|
||||||
|
|
||||||
|
void ShenandoahPacer::setup_for_reset() {
|
||||||
|
assert(ShenandoahPacing, "Only be here when pacing is enabled");
|
||||||
|
|
||||||
|
size_t initial = _heap->max_capacity();
|
||||||
|
restart_with(initial, 1.0);
|
||||||
|
|
||||||
|
log_info(gc, ergo)("Pacer for Reset. Non-Taxable: " SIZE_FORMAT "%s",
|
||||||
|
byte_size_in_proper_unit(initial), proper_unit_for_byte_size(initial));
|
||||||
|
}
|
||||||
|
|
||||||
size_t ShenandoahPacer::update_and_get_progress_history() {
|
size_t ShenandoahPacer::update_and_get_progress_history() {
|
||||||
if (_progress == -1) {
|
if (_progress == -1) {
|
||||||
// First initialization, report some prior
|
// First initialization, report some prior
|
||||||
|
@ -74,6 +74,9 @@ public:
|
|||||||
void setup_for_updaterefs();
|
void setup_for_updaterefs();
|
||||||
void setup_for_traversal();
|
void setup_for_traversal();
|
||||||
|
|
||||||
|
void setup_for_reset();
|
||||||
|
void setup_for_preclean();
|
||||||
|
|
||||||
inline void report_mark(size_t words);
|
inline void report_mark(size_t words);
|
||||||
inline void report_evac(size_t words);
|
inline void report_evac(size_t words);
|
||||||
inline void report_updaterefs(size_t words);
|
inline void report_updaterefs(size_t words);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user