On Tue, 5 Dec 2023 01:20:28 GMT, Alex Menkov <amen...@openjdk.org> wrote:

> VM_HeapDumper caches stack traces for platform/carrier and mounted virtual 
> threads only.
> For unmounted virtual threads ThreadDumper objects are created on the stack 
> (see `VM_HeapDumper::dump_vthread`), so I don't see problems with memory 
> usage even huge number of unmounted vthreads.
> I think an option to exclude stack traces from heap dump is a separate task.

I was actually referring to the footprint of the hprof file, not the in process 
memory usage while producing it.

My concern with not doing the option to exclude stack traces now is that it 
could result in some unusable or unmanageably large heap dumps, or tools simply 
being overwhelmed by the number of threads. For example, I just looked at the 
VisualVM threads view, and it just produces a scrollable list of all threads. 
What happens if there are suddenly 10's of thousands if not millions of 
threads? If we are lucky is doesn't choke on them and the platform threads are 
first in the list, but this is the type of thing I'd like to see testing of 
before pushing this change.

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

PR Comment: https://git.openjdk.org/jdk/pull/16665#issuecomment-1839855843

Reply via email to