Skip to content
Permalink
Browse files

8240076: Shenandoah: pacer should cover reset and preclean phases

Reviewed-by: zgu
  • Loading branch information
shipilev committed Feb 26, 2020
1 parent d26dade commit 6913bbc200454d8738645f443b47229372622de2
@@ -1814,10 +1814,16 @@ void ShenandoahHeap::op_roots() {
}

void ShenandoahHeap::op_reset() {
if (ShenandoahPacing) {
pacer()->setup_for_reset();
}
reset_mark_bitmap();
}

void ShenandoahHeap::op_preclean() {
if (ShenandoahPacing) {
pacer()->setup_for_preclean();
}
concurrent_mark()->preclean_weak_refs();
}

@@ -177,6 +177,31 @@ void ShenandoahPacer::setup_for_idle() {
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() {
if (_progress == -1) {
// First initialization, report some prior
@@ -74,6 +74,9 @@ class ShenandoahPacer : public CHeapObj<mtGC> {
void setup_for_updaterefs();
void setup_for_traversal();

void setup_for_reset();
void setup_for_preclean();

inline void report_mark(size_t words);
inline void report_evac(size_t words);
inline void report_updaterefs(size_t words);

0 comments on commit 6913bbc

Please sign in to comment.