RFR: 8314629: Generational ZGC: Clearing All SoftReferences log line lacks GCId
Guoxiong Li
gli at openjdk.org
Thu Dec 28 11:07:47 UTC 2023
On Thu, 28 Dec 2023 10:27:01 GMT, Erik Österlund <eosterlund at openjdk.org> wrote:
> This makes me a bit nervous. I think this introduces behavioural changes and not just logging changes. By moving the decision making of whether to clear soft references or not past the mark start pause that bumps the sequence number of the two generations, I think you are subtly introducing a race condition that can yield premature OOM issues. If you want to change the logging here, I think we need to find a different way. Perhaps decouple the decision making and logging so we can log wherever we want to without changing the behaviour.
@fisk I missed that the young GC also uses such info to discover references (but only the old generation processes references ). Thanks for reminding me.
What about moving the related code to the start of the method `ZDriverMajor::gc`? The alternative I mentioned.
It means that the tag `O`, shown below, will not be outputted.
[4781.774s][info][gc,ref] GC(1239) O: Clearing All SoftReferences
-------------
PR Comment: https://git.openjdk.org/jdk/pull/17196#issuecomment-1871061368
More information about the hotspot-gc-dev
mailing list