RFR: 8352075: Perf regression accessing fields [v4]
Radim Vansa
rvansa at openjdk.org
Mon May 5 18:39:49 UTC 2025
On Mon, 5 May 2025 15:00:04 GMT, Coleen Phillimore <coleenp at openjdk.org> wrote:
>> Radim Vansa has updated the pull request incrementally with one additional commit since the last revision:
>>
>> Move constant to static final var
>
> Also should probably add your test to test/micro/org/openjdk/bench as a JMH
@coleenp I wouldn't mind keeping the order in InstanceKlass (or elsewhere), but it would increase memory usage - and through this go against the idea from https://bugs.openjdk.org/browse/JDK-8292818 that tries to reduce the memory footprint. Would that be acceptable?
If methods are already sorted alphabetically, it would make sense for fields, too.
> I'm wondering if instead this patch could create a cache of the FieldInfoStream in InstanceKlass for certain heuristics.
If we'd have something like a complete n-ary tree or hashtable, it would most likely take several bytes per field. I am not sure how much memory can I sacrifice... Even if we can have the structure only for 'big' classes.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/24847#issuecomment-2851974225
More information about the serviceability-dev
mailing list