RFR: 8364081: Shenandoah & GenShen logging improvement [v2]
Y. Srinivas Ramakrishna
ysr at openjdk.org
Mon Jul 28 19:10:53 UTC 2025
On Mon, 28 Jul 2025 17:03:04 GMT, Rui Li <duke at openjdk.org> wrote:
> > I am wondering if we could just hoist the incrementing of the collections count to run_gc_cycle() which would normally take care of everything at once in one place, with the option true for stw and full cases.
>
> I thought about moving them into `run_gc_cycle()` actually. However, some of the gc runs can be cancelled:
>
> https://github.com/openjdk/jdk/blob/ed455a803961f412c9e5855ec409e45980d64d00/src/hotspot/share/gc/shenandoah/shenandoahControlThread.cpp#L284-L286
>
> While the total collection means collections that have been "started":
>
> https://github.com/openjdk/jdk/blob/f53d0519b9a3a6eaf64fb938dfedc09795ac31f8/src/hotspot/share/gc/shared/collectedHeap.hpp#L389
>
> So we have to put them into each individual method.
Interesting. Would it work to put the incrementing inside the `ShenandoahGCSession` constructor, or would there be issues with that in terms of something for which the counts would go awry in some cases?
>
> Updated for the other two comments.
Thanks, those look good!
-------------
PR Comment: https://git.openjdk.org/jdk/pull/26469#issuecomment-3128710666
More information about the hotspot-gc-dev
mailing list