> JDK-8237354 introduced the concept of "foreground work" in WorkGang, as a > special case for use by the HeapDumper. I propose that we remove this code, > since this special use case can be solved without the need for the concept of > "foreground work" in WorkGang. > > As far as I can tell, there's no reason why it must be the VM thread that > takes on the task of writing the header, iterating over roots, etc. So, in > VM_HeapDumper::work(), instead of checking if the current thread is the VM > thread we can just check if the worker_id is non-zero. That way, a single > worker thread will take on the task of writing the header, iterating over > roots, etc, and all other worker threads will continue to call worker_loop(). > > Testing: > - Passed Tier1-3 > - Passed multiple runs of test/hotspot/jtreg/serviceability/dcmd/gc/ > - Manually ran jcmd GC.heap_dump with various GCs enabled
Per Liden has updated the pull request incrementally with one additional commit since the last revision: Remove asserts ------------- Changes: - all: https://git.openjdk.java.net/jdk/pull/5410/files - new: https://git.openjdk.java.net/jdk/pull/5410/files/74ab4a07..7a9abf0c Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=5410&range=01 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=5410&range=00-01 Stats: 4 lines in 3 files changed: 0 ins; 3 del; 1 mod Patch: https://git.openjdk.java.net/jdk/pull/5410.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/5410/head:pull/5410 PR: https://git.openjdk.java.net/jdk/pull/5410