RFR: 8352075: Perf regression accessing fields [v20]

Coleen Phillimore coleenp at openjdk.org
Tue Jun 3 00:14:58 UTC 2025


On Mon, 2 Jun 2025 23:49:51 GMT, Coleen Phillimore <coleenp at openjdk.org> wrote:

>> Radim Vansa has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Fix error on windows
>
> src/hotspot/share/utilities/packedTable.hpp line 38:
> 
>> 36:   uint32_t _key_mask;
>> 37:   unsigned int _value_shift;
>> 38:   uint32_t _value_mask;
> 
> Aren't all 4 of these types the same?  can you make them all uint32_t or all unsigned int?  (former preferred).

Can you explain somewhere how fields are mapped to this?  I assume they're sorted, for some reason I expected the packed table to be {name-cp-index, sig-cp-index, offset-in-fieldstream-for-direct-access}.  Does every field get 4 ints ?  So why is it packed into ```Array<u1>``` rather than just use ```Array<u4>```?  So much packing code that I don't know how anyone could ever debug it.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/24847#discussion_r2122360613


More information about the hotspot-dev mailing list