RFR: 8318650: Optimized subword gather for x86 targets. [v11]

Jatin Bhateja jbhateja at openjdk.org
Fri Feb 2 03:38:04 UTC 2024


On Thu, 1 Feb 2024 16:25:52 GMT, Jatin Bhateja <jbhateja at openjdk.org> wrote:

>> I guess the fact that the Java objects are 8 byte alignment padded and the alignment being done at lines 1609-1611 and 1616-1621 somehow takes care of this.
>
> Hi @sviswa7 , I have rolled back to originally proposed solution.

> I don't think Lilliput will relax the array alignment to below 4 bytes since the array length needs to be aligned at that.

HI @merykitty 

Lilliput wiki mention about shrinking object header below 4 bytes in future. 
https://wiki.openjdk.org/display/lilliput#:~:text=Future%20work%3A%2032%20bit%20or%20even%20smaller%20header%3F%20(If%20so%3A%20improve%20field%20layout%20to%20put%20fields%20in%20unused%20bits%20of%20header%20word)

On x86 page size always a power of 2, this along with minimum object size alignment in Java of 8 bytes even 4 bytes should be ok, We are anyway shuffling and extracting the byte / word of interest so any junk data read will be chopped off. But in edge case an overrun may land us into a non accessible address space, so we want to be super safe here. I am also sitting over other solution which is performant.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/16354#discussion_r1475481319


More information about the core-libs-dev mailing list