-
Enhancement
-
Resolution: Duplicate
-
P4
-
17, 21, 23, 24
In my application using Corretto 17.0.11.9, I observe that every Shenandoah cycle includes a safepoint for CleanClassLoaderDataMetaspaces. The CleanClassLoaderDataMetaspaces safepoints are often longer than all of the GC safepoints for one cycle combined, which is increasing our latency.
Is there any way to avoid this safepoint if it's not needed? For example, could we skip the clean up -- either locally at safepoint, or at safepoint caused by ServiceThread -- if no classes have been unloaded? I.e. can we predicate this block: https://github.com/openjdk/jdk17u/blob/c1c901179e8eac74d31c10fa7591787be7ce2668/src/hotspot/share/classfile/classLoaderDataGraph.cpp#L579-L592 with `classes_unloaded`?
I've attached a screenshot of Mission Control showing the long CleanClassLoaderDataMetaspaces safepoints in the middle of each Shenandoah cycle.
Is there any way to avoid this safepoint if it's not needed? For example, could we skip the clean up -- either locally at safepoint, or at safepoint caused by ServiceThread -- if no classes have been unloaded? I.e. can we predicate this block: https://github.com/openjdk/jdk17u/blob/c1c901179e8eac74d31c10fa7591787be7ce2668/src/hotspot/share/classfile/classLoaderDataGraph.cpp#L579-L592 with `classes_unloaded`?
I've attached a screenshot of Mission Control showing the long CleanClassLoaderDataMetaspaces safepoints in the middle of each Shenandoah cycle.
- duplicates
-
JDK-8306929 Avoid CleanClassLoaderDataMetaspaces safepoints when previous versions are shared
- Resolved