On Mon, 9 Sep 2024 12:12:23 GMT, Thomas Schatzl <tscha...@openjdk.org> wrote:

>> Roman Kennke has updated the pull request incrementally with two additional 
>> commits since the last revision:
>> 
>>  - Try to avoid lea in loadNklass (aarch64)
>>  - Fix release build error
>
> 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.

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

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

Reply via email to