RFR: 8139457: Relax alignment of array elements [v53]
Thomas Stuefe
stuefe at openjdk.org
Thu Feb 22 14:34:08 UTC 2024
On Wed, 23 Aug 2023 18:05:17 GMT, Axel Boldt-Christmas <aboldtch at openjdk.org> wrote:
>> Roman Kennke has updated the pull request incrementally with one additional commit since the last revision:
>>
>> Fix wrong alignment
>
> src/hotspot/share/oops/arrayOop.hpp line 59:
>
>> 57: // aligned 0 mod 8. The typeArrayOop itself must be aligned at least this
>> 58: // strongly.
>> 59: static bool element_type_should_be_aligned(BasicType type) {
>
> The comment above makes it sound like this is only valid for `typeArrayOop`. Should be updated to reflect the change.
Really nitpicky, but why even say "of an arrayOop"? What other use of "element" within the class arrayOopDesc would make sense here? Also, it does not check (which implies asserts or similar). Why not just
Given a type, return true if elements of that type must be aligned to 64-bit.
or similar.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/11044#discussion_r1499266276
More information about the hotspot-dev
mailing list