<div dir="ltr"><div>On Mon, Nov 21, 2022 at 3:39 PM Aleksey Shipilev wrote:</div><div>> It is technically simple to do: define a flag in globals.hpp and pass it in HeapDumper::dump_heap to</div><div>> HeapDumper::dump, which already takes "overwrite" argument. But the larger question is if this</div><div>> warrants the extension of (product) flag set. Once we add the flag, it adds up to maintenance costs,</div><div>> and would require multiple JDK releases to get rid of, once unused.</div><div class="gmail_quote"><div><br></div><div>I do not personally care at what level ("extension"?) it is added; I would think something like the `product` or `diagnostic` level would be best, assuming there are some variant of those that are only maintained for the current major version.</div><div><br></div><div>> Is your use case specifically about HeapDumpOnOutOfMemoryError?</div><div> <br></div><div>Yes, it is.  Sorry, I should have added that.  To be specific, we use `-XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath="$(mktemp ...)" -XX:+CrashOnOutOfMemoryError`.  For now, there is a workaround of using `mktemp --dry-run`, but this we would like to avoid, but it is not a huge problem.</div><div><br></div><div>Cheers,</div><div>Mariell</div></div></div>