On Sat, 25 Apr 2026 19:17:32 GMT, Quan Anh Mai <[email protected]> wrote:

>> Markus Grönlund has updated the pull request incrementally with one 
>> additional commit since the last revision:
>> 
>>   macros
>
> src/java.base/share/classes/jdk/internal/event/FinalFieldMutationEvent.java 
> line 66:
> 
>> 64:                 int newRootFieldSlotEpoch =
>> 65:                     currentEpoch << JfrEpochGeneration.EPOCH_SHIFT_INT | 
>> (slot & JfrEpochGeneration.VALUE_MASK_INT);
>> 66:                 return JfrEpochGeneration.compareAndExchange(root, 
>> SLOT_OFFSET, slot, newRootFieldSlotEpoch);
> 
> Drive-by-comment: Can you make `slot` non-final? I'm afraid there is a chance 
> the JIT will not produce correct code for accesses into this field if it lies 
> about its finality. See 
> [JDK-8379875](https://bugs.openjdk.org/browse/JDK-8379875).

I will leave the `slot` final, and instead inject a dedicated field for the 
epoch value.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/30922#discussion_r3142491683

Reply via email to