RFR: Remove unused ShPacer::setup_for_partial
Aleksey Shipilev
shade at redhat.com
Wed Sep 5 09:14:46 UTC 2018
This is unused after Traversal-Partial folding. And Pacer already tracks the traversal progress as
"live" data expected during this cycle. Let's remove it:
diff -r 96c558dcd234 src/hotspot/share/gc/shenandoah/shenandoahPacer.cpp
--- a/src/hotspot/share/gc/shenandoah/shenandoahPacer.cpp Wed Sep 05 10:46:40 2018 +0200
+++ b/src/hotspot/share/gc/shenandoah/shenandoahPacer.cpp Wed Sep 05 11:12:59 2018 +0200
@@ -141,35 +141,10 @@
"M, Non-Taxable: " SIZE_FORMAT "M, Alloc Tax Rate: %.1fx",
live / M, free / M, non_taxable / M, tax);
}
/*
- * Partial collection walks only the part of the heap. Incoming arugment will tell us how much
- * work the heuristics is expecting us to do. We would use that as the baseline.
- */
-
-void ShenandoahPacer::setup_for_partial(size_t work_words) {
- assert(ShenandoahPacing, "Only be here when pacing is enabled");
-
- size_t work_bytes = work_words * HeapWordSize;
- size_t free = _heap->free_set()->available();
-
- size_t non_taxable = free * ShenandoahPacingCycleSlack / 100;
- size_t taxable = free - non_taxable;
-
- double tax = 1.0 * work_bytes / taxable; // base tax for available free space
- tax = MAX2<double>(1, tax); // never allocate more than GC collects during the cycle
- tax *= ShenandoahPacingSurcharge; // additional surcharge to help unclutter heap
-
- restart_with(non_taxable, tax);
-
- log_info(gc, ergo)("Pacer for Partial. Work: " SIZE_FORMAT "M, Free: " SIZE_FORMAT
- "M, Non-Taxable: " SIZE_FORMAT "M, Alloc Tax Rate: %.1fx",
- work_bytes / M, free / M, non_taxable / M, tax);
-}
-
-/*
* In idle phase, we have to pace the application to let control thread react with GC start.
*
* Here, we have rendezvous with concurrent thread that adds up the budget as it acknowledges
* it had seen recent allocations. It will naturally pace the allocations if control thread is
* not catching up. To bootstrap this feedback cycle, we need to start with some initial budget
diff -r 96c558dcd234 src/hotspot/share/gc/shenandoah/shenandoahPacer.hpp
--- a/src/hotspot/share/gc/shenandoah/shenandoahPacer.hpp Wed Sep 05 10:46:40 2018 +0200
+++ b/src/hotspot/share/gc/shenandoah/shenandoahPacer.hpp Wed Sep 05 11:12:59 2018 +0200
@@ -59,11 +59,10 @@
void setup_for_idle();
void setup_for_mark();
void setup_for_evac();
void setup_for_updaterefs();
- void setup_for_partial(size_t work_words);
void setup_for_traversal();
inline void report_mark(size_t words);
inline void report_evac(size_t words);
inline void report_updaterefs(size_t words);
Testing: tier1_gc_shenandoah
Thanks,
-Aleksey
More information about the shenandoah-dev
mailing list