RFR: JDK-8322237: Heap dump contains duplicate thread records for mounted virtual threads [v2]
Alex Menkov
amenkov at openjdk.org
Fri Dec 22 00:31:51 UTC 2023
> HeapDumper dumps virtual threads in 2 places:
> - dumping platform threads (mounted virtual threads are dumped as separate thread object);
> - dumping heap objects when the object is `java.lang.VirtualThread`.
>
> In the 2nd case mounted virtual threads should be skipped (as they are already dumped with correct stack traces/stack references)
> Check that a virtual thread is mounted is non-trivial, method from JvmtiEnvBase was used for this.
>
> Testing: tier1..3, heapdump-related tests: open/test/hotspot/jtreg/serviceability,open/test/hotspot/jtreg/runtime/ErrorHandling,open/test/hotspot/jtreg/gc/epsilon,open/test/jdk/sun/tools/jhsdb
Alex Menkov has updated the pull request incrementally with one additional commit since the last revision:
feedback: reimplemented ThreadDumpe::is_vthread_mounted()
-------------
Changes:
- all: https://git.openjdk.org/jdk/pull/17134/files
- new: https://git.openjdk.org/jdk/pull/17134/files/3fc64e3a..0afd2a4f
Webrevs:
- full: https://webrevs.openjdk.org/?repo=jdk&pr=17134&range=01
- incr: https://webrevs.openjdk.org/?repo=jdk&pr=17134&range=00-01
Stats: 11 lines in 1 file changed: 9 ins; 1 del; 1 mod
Patch: https://git.openjdk.org/jdk/pull/17134.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/17134/head:pull/17134
PR: https://git.openjdk.org/jdk/pull/17134
More information about the hotspot-runtime-dev
mailing list