On Mon, 9 Sep 2024 14:58:07 GMT, Stefan Karlsson <stef...@openjdk.org> wrote:

>> src/hotspot/share/oops/oop.hpp line 134:
>> 
>>> 132:   inline Klass*   forward_safe_klass(markWord m) const;
>>> 133:   inline size_t   forward_safe_size();
>>> 134:   inline void     forward_safe_init_mark();
>> 
>> Given the comment these methods do not seem "safe" to me. Maybe use "raw" or 
>> something to better indicate that care must be taken to use them.
>> 
>> Maybe the "safe" refers to use them only in "safe" contexts, but in Hotspot 
>> code iirc we use something like "raw" or "unsafe".
>
> Restating my earlier comment about this: These functions are mainly used by 
> the GCs. In one of the patches I've cleaned away all usages except for those 
> in Shenandoah. I would prefer to see these completely removed from the oops/ 
> directory and let the GCs decide when and how to perform "safe" reads of 
> these values.

I've removed those methods.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/20677#discussion_r1751514466

Reply via email to