RFR: 8139457: Array bases are aligned at HeapWord granularity [v38]
Roman Kennke
rkennke at openjdk.org
Tue Jul 4 07:03:11 UTC 2023
On Mon, 3 Jul 2023 15:17:29 GMT, Aleksey Shipilev <shade at openjdk.org> wrote:
>> Roman Kennke has updated the pull request incrementally with one additional commit since the last revision:
>>
>> Build fixes
>
> src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/oops/Array.java line 68:
>
>> 66: return !VM.getVM().isCompressedOopsEnabled();
>> 67: }
>> 68: }
>
> I think `isCompressedOopsEnabled` already does the right thing, so:
>
> Suggestion:
>
> if (type == BasicType.T_OBJECT || type == BasicType.T_ARRAY) {
> return !VM.getVM().isCompressedOopsEnabled();
> }
On 32-bit, isCompressedOopsEnabled() would be false, so the method returns true, which means we would 8-byte align reference array elements? That doesn't seem right.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/11044#discussion_r1251582196
More information about the hotspot-dev
mailing list