RFR: 8329088: Stack chunk thawing races with concurrent GC stack iteration [v2]

Stefan Karlsson stefank at openjdk.org
Fri Apr 5 12:18:09 UTC 2024


On Fri, 5 Apr 2024 11:28:15 GMT, Aleksey Shipilev <shade at openjdk.org> wrote:

>> Erik Österlund has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Nits
>
> src/hotspot/share/oops/oop.inline.hpp line 242:
> 
>> 240: inline void oopDesc::int_field_put(int offset, jint value)          { *field_addr<jint>(offset) = value;    }
>> 241: inline jint oopDesc::int_field_relaxed(int offset) const            { return Atomic::load(field_addr<jint>(offset)); }
>> 242: inline void oopDesc::int_field_put_relaxed(int offset, jint value)  { Atomic::store(field_addr<jint>(offset), value); }
> 
> I have a stylistic question/suggestion. These are basically Java heap accessors, shouldn't they go through `HeapAccess<MO_RELAXED>::{load,store}`? This would also match the style already used in this file.

We don't use HeapAccess to access primitive values in objects. HeapAccess is only used when we access oops.

We do use RawAccess in some of these functions though, but we do that because there's no support for MQ_SEQ_CST in the Atomic APIs.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/18643#discussion_r1553521971


More information about the hotspot-dev mailing list