On Tue, 10 Sep 2024 09:28:41 GMT, Roman Kennke <rken...@openjdk.org> wrote:
>> With compact headers, this value should only be used in C2, and not really >> as an actual offset. An earlier version of the change had the value in >> src/hotspot/share/opto/type.hpp instead, and only an assert(!UCOH) in >> oopDesc::klass_offset_in_bytes(). I think this would be a better solution >> overall, because it prevents accidental (and wrong) usage of the >> klass_offset in the runtime. Back then it has been rejected by somebody >> (don't remember), because it made the C2 diff a little messier, so I kept it >> like it is now. I would prefer to reinstate it, though. > >> (Fwiw, the method is also used during Universe initialization). > > Yes, but only in the -UCOH branch. We will deal with it in a follow-up. https://bugs.openjdk.org/browse/JDK-8340453 ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/20677#discussion_r1791605009