RFR (S): 8213307: G1 should clean up RMT with ClassUnloadingWithConcurrentMark
shade at redhat.com
Mon Nov 5 14:49:21 UTC 2018
On 11/05/2018 03:28 PM, Thomas Schatzl wrote:
> I have no particular opinion about this, so I changed this particular
> hunk back. Note that all current Hotspot GCs, if either
> ClassUnloadingWithConcurrentMark/ClassUnloading is enabled, do class
> unloading at every gc.
> If e.g. Shenandoah would not do that by default, that might be a
> significant and potentially surprising difference in behavior compared
> to other GCs.
Shenandoah does class unloading every N-th concurrent cycle, and default N is coincidentally 5,
which is on the suggested threshold for this test. We have this test hooked up for Shenandoah, and
would like to keep it passing.
Talking about surprises in current Hotspot GCs: ZGC does not even do class unloading, even if users
"forces" it with -XX:+ClassUnloading(WithConcurrentMark) -- which is probably why we don't see ZGC
config in that test.
>> *) I'd consider conditionalizing ClassUnloadingWithConcurrentMark too
>> in the test -- we want to cover the Full GC case too, no?
> I am not sure how ClassUnloadingWithConcurrentMark affects class
> unloading during full gc. I will add -XX:+ClassUnloading to the test
> though to make sure that class unloading is done always regardless of
> gc type in the VM that is started (although both are on by default).
Yeah, I was first thinking to test the path where +ExplicitGCInvokesConcurrent, but
-XX:-ClassUnloadingWithConcurrentMark. But then the test would fail, because explicit System.gc()
from the test would not clean up RMT, and that would arguably be the intended behavior. So this
config would be irrelevant.
Adding -XX:+ClassUnloading is a good touch.
> New webrevs:
> http://cr.openjdk.java.net/~tschatzl/8213307/webrev.0_to_1/ (diff)
> http://cr.openjdk.java.net/~tschatzl/8213307/webrev.1/ (full)
Looks good to me!
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 833 bytes
Desc: OpenPGP digital signature
More information about the hotspot-gc-dev