[master] RFR: Relax array elements alignment [v5]
Thomas Stuefe
stuefe at openjdk.java.net
Tue Apr 26 05:47:21 UTC 2022
On Wed, 20 Apr 2022 14:15:56 GMT, Roman Kennke <rkennke at openjdk.org> wrote:
>> PR #40 eliminated the Klass* word. A whole class of objects would not benefit from it, though: array elements are aligned at 8-byte-boundaries, even for element types where this is not necessary (byte, bool, char, short, int, float, compressed-objs). This means that array elements would still start at byte#16, after 8 bytes header and 4 bytes length and another 4 bytes unused gap.
>>
>> This change improves the array element alignment and relaxes it such that elements can align at 4-byte boundaries.
>>
>> Note about C2 changes: the code that extracts the state field (either byte, int or long array) assumed that all arrays would be equal, and asks for header size of T_INT. This would give wrong offset for T_LONG arrays.
>>
>> I'm adding a test that checks correct array elements base offsets.
>>
>> GHA seems to see 3 new test failures (timeouts), but only on Windows(x64). I ran the same test on a different Windows machine (all of compiler/c2/irTests) and could not reproduce the failures. They do look like timeouts on GHA, maybe it's just too long-running tests?
>>
>> Those are the GHA/Windows failing tests:
>> compiler/c2/irTests/TestAutoVectorization2DArray.java
>> compiler/c2/irTests/TestIRAbs.java
>> compiler/c2/irTests/TestStripMiningDropsSafepoint.java
>>
>> Testing:
>> - [x] tier1 (x86_64)
>> - [x] tier1 (x86_32)
>> - [x] tier1 (aarch64)
>> - [x] tier2 (x86_64)
>> - [x] tier2 (x86_32)
>> - [x] tier2 (aarch64)
>> - [x] tier3 (x86_64)
>> - [x] tier3 (x86_32)
>> - [x] tier3 (aarch64)
>
> Roman Kennke has updated the pull request incrementally with one additional commit since the last revision:
>
> Use correct array element type to determine header size in TypeAryPtr::dump2()
Would be nice upstream too, to finally fix https://bugs.openjdk.java.net/browse/JDK-8139457. Arguably not that important since compressed class pointers are independent of compressed oops now, but still.
-------------
PR: https://git.openjdk.java.net/lilliput/pull/41
More information about the lilliput-dev
mailing list