RFR: 8352075: Perf regression accessing fields [v23]

Radim Vansa rvansa at openjdk.org
Mon Jun 9 06:43:59 UTC 2025


On Fri, 6 Jun 2025 15:46:31 GMT, Coleen Phillimore <coleenp at openjdk.org> wrote:

>> src/hotspot/share/oops/fieldInfo.inline.hpp line 126:
>> 
>>> 124:   fi._offset = _r.next_uint();
>>> 125:   fi._access_flags = AccessFlags(checked_cast<u2>(_r.next_uint()));
>>> 126:   fi._field_flags = FieldInfo::FieldFlags(_r.next_uint());
>> 
>> These callers don't need to know about _r even though they're in FieldInfoStream.  And then you don't need to make these changes.
>
> The addition of read_name_and_signature() is a good level of abstraction.

We must have some misunderstanding. This is not `FieldInfoStream`, this is `FieldInfoReader::read_field_info`, therefore I don't see any issue accessing private `FieldInfoReader::_r`. I've removed all friend classes from `FieldInfoReader` - noone outside `FieldInfoReader` can see `_r`.

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

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


More information about the hotspot-dev mailing list