RFR: 8352588: GenShen: Enabling JFR asserts when getting GCId [v4]
Y. Srinivas Ramakrishna
ysr at openjdk.org
Mon Mar 24 23:11:09 UTC 2025
On Mon, 24 Mar 2025 18:30:23 GMT, William Kemper <wkemper at openjdk.org> wrote:
>> Xiaolong Peng has updated the pull request incrementally with one additional commit since the last revision:
>>
>> No need to calculate gc_id using gc_count
>
> src/hotspot/share/gc/shenandoah/shenandoahControlThread.cpp line 137:
>
>> 135: // GC is starting, bump the internal gc count and set GCIdMark
>> 136: update_gc_count();
>> 137: GCIdMark gc_id_mark;
>
> Can we still set the `GCIdMark` with our internal counter? I'd prefer they stay in sync explicitly.
@earthling-amzn : Is your concern that GC count is incremented concurrently by two different callers? If so, I'd have the atomic increment return the pre- or post-increment value as the case may be and have the caller use that in their mark label. (Question: do we have different Id's for young and a concurrent/interrupted old? -- I would imagine so, with the old carrying an older id, and each subsequent young getting a newer id).
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/24166#discussion_r2011041651
More information about the shenandoah-dev
mailing list