RFR: 8305895: Implement JEP 450: Compact Object Headers (Experimental) [v8]
Stefan Karlsson
stefank at openjdk.org
Tue Sep 10 10:05:10 UTC 2024
On Tue, 10 Sep 2024 08:41:16 GMT, Roman Kennke <rkennke at openjdk.org> wrote:
>> src/hotspot/share/oops/objArrayKlass.inline.hpp line 74:
>>
>>> 72: void ObjArrayKlass::oop_oop_iterate(oop obj, OopClosureType* closure) {
>>> 73: // In this assert, we cannot safely access the Klass* with compact headers.
>>> 74: assert (UseCompactObjectHeaders || obj->is_array(), "obj must be array");
>>
>> If we can't safely access the `Klass*` here, why is the call to `obj->klass()` below safe?
>
> Good question. This comment and assert can probably be removed (same for the similar comment/assert in TypeArrayKlass::oop_oop_iterate_impl(). Could be a left-over from a time when we had to deal with OM and/or stack-locks in the header.
FWIW, I've been running tests with this assert restored (and the one in TypeArrayKlass) without hitting any problems.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/20677#discussion_r1751656595
More information about the serviceability-dev
mailing list