RFR: 8352299: GenShen: Young cycles that interrupt old cycles cannot be cancelled [v3]

Aleksey Shipilev shade at openjdk.org
Tue Mar 25 11:13:24 UTC 2025


On Mon, 24 Mar 2025 18:21:14 GMT, Kelvin Nilsen <kdnilsen at openjdk.org> wrote:

>> William Kemper has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Widen type of shared enum value to unlock platform support of atomic xchg
>
> src/hotspot/share/gc/shenandoah/shenandoahHeap.cpp line 2143:
> 
>> 2141: 
>> 2142: bool ShenandoahHeap::try_cancel_gc(GCCause::Cause cause) {
>> 2143:   const jbyte prev = _cancelled_gc.xchg(cause);
> 
> I guess maybe we want cause and prev to be integer type.   Then the template will expand into a type that is known to that Atomic::xchg operation.

So this thing is no longer `jbyte`, so implicit cast to `jbyte` is no longer safe. I think we should really be casting to `GCCause::Cause`.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/24105#discussion_r2011861121


More information about the shenandoah-dev mailing list