RFR: Setup process references and class unloading once before the cycle
Aleksey Shipilev
shade at redhat.com
Fri Mar 2 11:49:13 UTC 2018
http://cr.openjdk.java.net/~shade/shenandoah/heuristics-pr-cu/webrev.01/
We used to rely on CollectorPolicy process_references/unload_classes calls to be idempotent. But
they are not required to be! For example, "aggressive" answers it randomly, and other heuristics are
relying on inputs that might change abruptly.
The cleaner solution would be to ask the policy once, before starting the cycle, and store that
decision somewhere. It seems ShHeap itself is the best way to share this data. The methods in
CollectorPolicy are renamed to capture accidental use. Getters in ShConcMark delegate back to heap
for simplicity.
Additionally, this allows us to print "Init Mark" with attributes, like we do with "Final Mark" today.
Testing: hotspot_gc_shenandoah
Thanks,
-Aleksey
More information about the shenandoah-dev
mailing list