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

List:       openjdk-serviceability-dev
Subject:    Re: RFR: JDK-8318566: Heap walking functions should not use FilteredFieldStream
From:       Chris Plummer <cjplummer () openjdk ! org>
Date:       2024-01-31 23:39:00
Message-ID: EMTaDvCBQ2Ham6qJmwLvyc_mlHPvtzYbRA2eZXkZhBA=.bdc8e162-d2dc-4c29-a445-6ca4bb217342 () github ! com
[Download RAW message or body]

On Wed, 31 Jan 2024 21:28:34 GMT, Alex Menkov <amenkov@openjdk.org> wrote:

> FilteredFieldStream used by heap walking functions to iterate through \
> klass/superclasses/interfaces fields are known to have poor performance (see \
> [JDK-8317692](https://bugs.openjdk.org/browse/JDK-8317692) for details). Heap \
> walking API implementation is the last user of the klasses. The fix reworks \
> iteration through klass/superclasses/interfaces fields and drops \
> FilteredFieldStream-related code. Additionally removed/updated includes of \
> reflectionUtils.hpp. 
> Testing:
> - tier1..4;
> - test/hotspot/jtreg/vmTestbase/nsk/jvmti (contains tests for different heap \
>                 walking functions);
> - new test from #17580 (now the test runs several times faster).

src/hotspot/share/prims/jvmtiTagMap.cpp line 453:

> 451:   InstanceKlass* super_klass = ik->java_super();
> 452:   if (super_klass != nullptr) {
> 453:     start_index += add_instance_fields(super_klass, start_index);

Does hotspot have any rules against potentially very deep recursion that can overflow \
the stack?

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

PR Review Comment: https://git.openjdk.org/jdk/pull/17661#discussion_r1473607788


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

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