RFR: 8352075: Perf regression accessing fields [v20]

Coleen Phillimore coleenp at openjdk.org
Fri Jun 6 16:45:05 UTC 2025


On Thu, 5 Jun 2025 20:37:22 GMT, Coleen Phillimore <coleenp at openjdk.org> wrote:

>> Yes, in practice these all are of the same size, but in case of the masks (as well as in case of arguments in API) I want to stress out that these are 32 bit numbers. The `unsigned int`s are just 'some not too big number'.
>> Is there any general guidance on deciding between `unsigned int` (I suppose just `unsigned` is not recommended), `uint32_t` and `u4`?
>> 
>> I was hoping that the comment on line 68 explains the intended use, but I can be more verbose and document each method. When the packed table is used for fieldinfo, it's { offset-in-fieldstream, index-in-fieldstream }. The Comparator implementation can translate offset-in-fieldstream -> { name, signature } and then do the comparison. The `index-in-fieldstream` is kind of second-class citizen; we need to fill it into `FieldInfo` and it is not encoded in the stream, therefore we need to encode it in the packed table.
>
> Reading further, I see what this mapping is and intentionally generalized.  I guess a comment like, the key and value are sized to represent the maximum value for each and then compacted, or something like that.  But maybe I haven't figured out the packing.  Are they increments of u1, u2 or u4 or something in between?

Yes this is helpful, but could you move this to the implementation in the cpp file?

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

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


More information about the serviceability-dev mailing list