On Wed, 7 Oct 2026 00:23:36 GMT, Serguei Spitsyn <[email protected]> wrote:

>> When the JVMTI `IterateThroughHeap` has a class filter then the flattened 
>> value objects contained in the fields of filtered class objects are not 
>> reported. The fix is:
>>  - If the object has flattened fields, visit and report them as heap objects 
>> even though this object was not reported.
>> 
>> The update adds new test with a needed coverage:
>>   
>> `test/hotspot/jtreg/serviceability/jvmti/valhalla/Heapwalking/FlatClassFilterTest.java`
>> 
>> Testing:
>>  - check new test is failing without fix and is passing with the fix
>>  - TBD: run mach5 tiers 1-6
>> 
>> ---------
>> - [x] I confirm that I make this contribution in accordance with the 
>> [OpenJDK Interim AI Policy](https://openjdk.org/legal/ai).
>
> Serguei Spitsyn has updated the pull request incrementally with one 
> additional commit since the last revision:
> 
>   add a testcase with JVMTI_HEAP_FILTER_CLASS_UNTAGGED

test/hotspot/jtreg/serviceability/jvmti/valhalla/Heapwalking/libFlatClassFilterTest.cpp
 line 66:

> 64:     return JNI_ERR;
> 65:   }
> 66:   if (options != nullptr && strcmp(options, "heap_filter_class_untagged") 
> == 0) {

You should probably return a JNI error if the strcmp fails. Otherwise if there 
is an error in the arg passing or matching, you just end up doing the first 
test case again.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/33172#discussion_r4202480834

Reply via email to