RFR: 8305895: Implementation: JEP 450: Compact Object Headers (Experimental) [v13]
Roman Kennke
rkennke at openjdk.org
Fri May 12 16:54:55 UTC 2023
On Fri, 12 May 2023 15:50:14 GMT, Coleen Phillimore <coleenp at openjdk.org> wrote:
>> Roman Kennke has updated the pull request incrementally with one additional commit since the last revision:
>>
>> Some hashcode improvements (mostly SA)
>
> src/hotspot/share/oops/klass.cpp line 207:
>
>> 205: return prototype;
>> 206: }
>> 207:
>
> This seems like a useful change without UseCompactObjectHeaders as an enhancement and to remove some conditional code. Since we have storage in Klass for it anyway.
Why? This code used to be there with BiasedLocking, and has been removed. I've re-instated it for compact object headers, because the prototype mark for an object now depends on its Klass, but other than that, why would it be useful? The prototype would be just markWord::prototype().
> src/hotspot/share/oops/objArrayKlass.cpp line 160:
>
>> 158: size_t ObjArrayKlass::oop_size(oop obj) const {
>> 159: // In this assert, we cannot safely access the Klass* with compact headers.
>> 160: assert(UseCompactObjectHeaders || obj->is_objArray(), "must be object array");
>
> Isn't there code that checks oop->is_objArray() before calling this? Would it return true when it's not an objArray?
Yes, there is. We're a bit excessive with asserting the klass here. I tried to remain as close as possible with that, so I disabled it only for compact object headers.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/13844#discussion_r1192601974
PR Review Comment: https://git.openjdk.org/jdk/pull/13844#discussion_r1192602701
More information about the shenandoah-dev
mailing list