RFR: 8305895: Implement JEP 450: Compact Object Headers (Experimental) [v8]

Roman Kennke rkennke at openjdk.org
Tue Sep 10 08:36:13 UTC 2024


On Mon, 9 Sep 2024 14:58:07 GMT, Stefan Karlsson <stefank at 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


More information about the build-dev mailing list