RFR: 8352075: Perf regression accessing fields [v21]
Radim Vansa
rvansa at openjdk.org
Thu Jun 5 21:10:01 UTC 2025
On Thu, 5 Jun 2025 20:28:13 GMT, Coleen Phillimore <coleenp at openjdk.org> wrote:
>> Radim Vansa has updated the pull request incrementally with three additional commits since the last revision:
>>
>> - Moved jtreg test
>> - Improved documentation
>> - Fix coding style (asterisk placement)
>
> src/hotspot/share/oops/fieldInfo.hpp line 238:
>
>> 236:
>> 237: private:
>> 238: uint32_t next_uint() { return _r.next_uint(); }
>
> Why did you make this change and have the callers expose _r ?
AFAIU `_r` is not exposed, it's private. My change removes `next_uint()` because it's at wrong level of abstraction: `FieldInfoReader` should expose things java/injected fields counts (and field info itself), not just some 'uint's.
The encapsulation is imperfect as the methods have to be called anyway only in the correct order but to me it seemed as a way forward.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/24847#discussion_r2130383028
More information about the serviceability-dev
mailing list