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).

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

Commit messages:
 - 8389460: JVMTI IterateThroughHeap class filter skips flattened value objects

Changes: https://git.openjdk.org/jdk/pull/33172/files
  Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=33172&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8389460
  Stats: 292 lines in 3 files changed: 226 ins; 35 del; 31 mod
  Patch: https://git.openjdk.org/jdk/pull/33172.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/33172/head:pull/33172

PR: https://git.openjdk.org/jdk/pull/33172

Reply via email to