On Wed, 2 Sep 2026 03:50:51 GMT, Shiv Shah <[email protected]> wrote:

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

test/hotspot/jtreg/serviceability/sa/ClhsdbRevPtrsForVirtualThread.java line 29:

> 27:  * @summary Test that clhsdb 'revptrs' finds references from a virtual 
> thread's stack chunk
> 28:  * @requires vm.hasSA
> 29:  * @requires vm.gc.Serial

What are the issues with other GCs?

test/hotspot/jtreg/serviceability/sa/ClhsdbRevPtrsForVirtualThread.java line 66:

> 64:             }
> 65: 
> 66:             String output = test.run(theApp.getPid(), List.of("revptrs " 
> + addr), null, null);

Although it probably won't impact this test, we currently have a reverse 
pointer bug https://bugs.openjdk.org/browse/JDK-8241235. Make sure you at least 
run this test with -Xcomp.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/32637#discussion_r3928218208
PR Review Comment: https://git.openjdk.org/jdk/pull/32637#discussion_r3928241364

Reply via email to