[prev in list] [next in list] [prev in thread] [next in thread] 

List:       openjdk-serviceability-dev
Subject:    Re: RFR: JDK-8318563: GetClassFields should not use random access to field
From:       Serguei Spitsyn <sspitsyn () openjdk ! org>
Date:       2023-12-14 2:52:36
Message-ID: 73S5mXiweVRQDjHUz3dHncaRgYfQb3gzSiwqVshk_Ak=.d15ac98f-a569-40b6-9023-01d7f01ba27c () github ! com
[Download RAW message or body]

On Wed, 13 Dec 2023 21:32:50 GMT, Alex Menkov <amenkov@openjdk.org> wrote:

> FieldStream/FilteredFieldStream classes from reflectionUtils.hpp iterate class \
> fields in the reverse order and use field indexes to access instead of forward \
> iteration. This is performance ineffective (see \
> [JDK-8317692](https://bugs.openjdk.org/browse/JDK-8317692) for details). The change \
> introduces new class FilteredJavaFieldStream as a replacement for \
> FilteredFieldStream. It uses the same FilteredField/FilteredFieldsMap stuff as \
> FilteredJavaFieldStream does. 
> FieldStream/FilteredFieldStream are still used by heap walking API, will be cleaned \
> by [JDK-8317636](https://bugs.openjdk.org/browse/JDK-8317636) 
> Testing:
> - tier1..3
> - all tests which calls GetClassFields: \
> open/test/hotspot/jtreg/serviceability/jvmti,open/test/hotspot/jtreg/vmTestbase/nsk/ \
> jvmti/GetClassFields,open/test/hotspot/jtreg/vmTestbase/nsk/jvmti/IterateThroughHeap,open/test/hotspot/jtreg/vmTestbase/nsk/jvmti/unit/IsSynthetic
>  including
> - test/hotspot/jtreg/vmTestbase/nsk/jvmti/GetClassFields/getclfld007.java - tests \
>                 that GetClassFields returns fields in correct order;
> - test/hotspot/jtreg/serviceability/jvmti/GetClassFields/FilteredFields/FilteredFieldsTest.java \
> - test that GetClassFields filters out field like reflection.

This looks good in general. Will make one more pass tomorrow.

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

PR Comment: https://git.openjdk.org/jdk/pull/17094#issuecomment-1855032678


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic