On Tue, 12 Dec 2023 07:06:07 GMT, David Holmes <dhol...@openjdk.org> wrote:

> Prior to the virtual thread changes what thread is performing the merge?

Prior the change merge is performed on either AttachListener thread (when it's 
the current thread - special case for tools like jcmd) or on VMThread (if the 
current thread is not AttachListener thread).
Note also that prior the change segmented dumping was conditional - if GC 
supports multiple workers and if the caller requests parallel dump. 
HeapDumpAfterFullGC/HeapDumpBeforeFullGC request dumping in 1 thread, so there 
was no merge in the scenarios.

> After these changes what thread would do it if not included in the VM 
> operation?

On the current thread. As I wrote before I 'm not sure if it can cause some 
unexpected consequences in some cases.
I tried to do the change - tier1 passed (TestReduceAllocationAndHeapDump.java 
test calls Runtime.gc() with HeapDumpAfterFullGC, merge is performed on main 
java thread)

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

PR Review Comment: https://git.openjdk.org/jdk/pull/17040#discussion_r1424619940

Reply via email to