Gives objects that are only reachable from a parked virtual thread’s stack a 
root in the heap dump. the writer now treats an unmounted virtual thread the 
way the hotspot dumper does, a thread object root on the dummy stack trace plus 
a java frame root for each oop in the thread’s stack chunks, so tools stop 
reporting those objects as unreachable. the chunk walk uses the gc bitmap, so 
it covers chunks that have been through a gc, which is the long parked case, 
freshly parked chunks still need the frame walk. revptrs picks up the same 
walk, and the revptrs test now fails on any swallowed exception

The new heap dump test fails on master with no root for the referenced object 
and passes with the change. serviceability and sun/tools groups pass on both 
thread factories.


---------
- [x] I confirm that I make this contribution in accordance with the [OpenJDK 
Interim AI Policy](https://openjdk.org/legal/ai).

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

Commit messages:
 - Look up the injected flags field and harden the revptrs test
 - Add a heap dump test for an unmounted virtual thread
 - Write roots for unmounted virtual threads in the heap dump
 - Merge master
 - Add a revptrs test for references from stack chunks
 - Shorten the comments
 - Visit stack chunk oops from the bitmap when scanning
 - Shorten the comment
 - Size stack chunks from the chunk itself and unlist the heap dump test
 - Let apps run on the current thread and problem list the heap dump test for 
virtual
 - ... and 5 more: https://git.openjdk.org/jdk/compare/689b4a64...708baa23

Changes: https://git.openjdk.org/jdk/pull/32637/files
  Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=32637&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8261848
  Stats: 406 lines in 5 files changed: 406 ins; 0 del; 0 mod
  Patch: https://git.openjdk.org/jdk/pull/32637.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/32637/head:pull/32637

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

Reply via email to