RFR: 8305895: Implementation: JEP 450: Compact Object Headers (Experimental) [v3]

Roman Kennke rkennke at openjdk.org
Wed May 10 14:21:38 UTC 2023


On Wed, 10 May 2023 10:42:38 GMT, Aleksey Shipilev <shade at openjdk.org> wrote:

>> Roman Kennke has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Allow to resolve mark with LW locking
>
> src/hotspot/share/gc/shared/collectedHeap.cpp line 232:
> 
>> 230:   // With compact headers, we can't safely access the class, due
>> 231:   // to possibly forwarded objects.
>> 232:   if (!UseCompactObjectHeaders && is_in(object->klass_raw())) {
> 
> Looks good, but what this even supposed to check? `object` is not `oop` if its klass field points into Java heap? Huh? Was it some CMS shenanigan that stores something in klass word? Or is it just a glorified null check? I'll follow up on that separately.

I have no idea *shrugs*

> src/hotspot/share/gc/shared/collectedHeap.hpp line 312:
> 
>> 310: 
>> 311:   virtual void fill_with_dummy_object(HeapWord* start, HeapWord* end, bool zap);
>> 312:   static size_t min_dummy_object_size() {
> 
> Why this change?

That's because oopDesc::header_size() can no longer be constexpr, because it depends on UseCompactObjectHeaders.

> test/hotspot/jtreg/runtime/FieldLayout/BaseOffsets.java line 62:
> 
>> 60: 
>> 61:   // @0:  8 byte header,  @8: int field
>> 62:     static final long INT_OFFSET;
> 
> What that comment is supposed to mean?
> 
> Suggestion:
> 
>     // @0:  8 byte header,  @8: int field
>     static final long INT_OFFSET;

This test is a variation of the OldLayoutCheck test, where the comment is better. It doesn't make much sense here, though. I'm removing it.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/13844#discussion_r1189983638
PR Review Comment: https://git.openjdk.org/jdk/pull/13844#discussion_r1189982822
PR Review Comment: https://git.openjdk.org/jdk/pull/13844#discussion_r1189980306


More information about the shenandoah-dev mailing list