RFR: Passive heuristics should consistently process refs and unload classes
Roman Kennke
rkennke at redhat.com
Tue May 30 08:26:36 UTC 2017
Ok
Am 30. Mai 2017 09:59:50 MESZ schrieb Aleksey Shipilev <shade at redhat.com>:
>We have copied the random block from Aggressive policy to Passive one.
>The goal
>for random selection in Aggressive is to exercise all paths. For
>Passive, we are
>better off being consistent:
>
>$ hg diff
>diff -r 1d44a55dc2c9
>src/share/vm/gc/shenandoah/shenandoahCollectorPolicy.cpp
>--- a/src/share/vm/gc/shenandoah/shenandoahCollectorPolicy.cpp Tue May
>30
>09:45:47 2017 +0200
>+++ b/src/share/vm/gc/shenandoah/shenandoahCollectorPolicy.cpp Tue May
>30
>09:56:58 2017 +0200
>@@ -431,14 +431,14 @@
> }
>
> virtual bool process_references() {
>- // Randomly process refs with 50% chance.
>- return (os::random() & 1) == 1;
>+ // Always process references.
>+ return true;
> }
>
> virtual bool unload_classes() {
> if (ShenandoahUnloadClassesFrequency == 0) return false;
>- // Randomly unload classes with 50% chance.
>- return (os::random() & 1) == 1;
>+ // Always unload classes.
>+ return true;
> }
> };
>
>
>Testing: hotspot_gc_shenandoah
>
>Thanks,
>-Aleksey
--
Sent from my FairPhone
More information about the shenandoah-dev
mailing list