On Wed, 7 Oct 2026 17:07:43 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 more checks and logs

The fix looks good. Just one potential test improvement.

test/hotspot/jtreg/serviceability/jvmti/valhalla/Heapwalking/FlatClassFilterTest.java
 line 132:

> 130:             throw new AssertionError("The array is expected to be flat");
> 131:         }
> 132:         if (filtered != all) {

I think it would be  make sense to add sanity check that 'all' > 30. Just to 
ensure that not all Value classes are skipped.

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

Marked as reviewed by lmesnik (Reviewer).

PR Review: https://git.openjdk.org/jdk/pull/33172#pullrequestreview-5477236192
PR Review Comment: https://git.openjdk.org/jdk/pull/33172#discussion_r4236116077

Reply via email to