RFR: 8352299: GenShen: Young cycles that interrupt old cycles cannot be cancelled [v4]
William Kemper
wkemper at openjdk.org
Tue Mar 25 17:51:41 UTC 2025
On Tue, 25 Mar 2025 11:08:58 GMT, Aleksey Shipilev <shade at openjdk.org> wrote:
>> 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`.
Yes! Good catch.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/24105#discussion_r2012624868
More information about the hotspot-gc-dev
mailing list