RFR: 8309403: Serial: Remove the useless adaptive size policy in GenCollectedHeap

Albert Mingkun Yang ayang at openjdk.org
Wed Jun 7 11:10:02 UTC 2023


On Tue, 6 Jun 2023 16:23:36 GMT, Guoxiong Li <gli at openjdk.org> wrote:

> why do we set it to false again

`WB_FullGC` should restore the global env. Otherwise, the following non-whitebox-full-gc cycles can unnecessarily clear soft-refs.

> If we have a reason to set it to false again, why do other GCs not set it

G1 does that inside `WB_FullGC`. ZGC doesn't rely on `SoftRefPolicy::should_clear_all_soft_refs`. Parallel doesn't clear the flag, which I believe is a bug.

This inconsistency is probably accidental; keeping the global env intact (essentially what ZGC does) seems the cleanest approach IMO. I wonder if other collectors can also adopt it; in another PR(s) ofc.

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/14296#discussion_r1221397084


More information about the hotspot-gc-dev mailing list