<div dir="ltr"><div class="gmail_quote"><div dir="ltr">Hi,<div><br></div><div>Would it be possible to add a new option for overwriting the file provided by the `-XX:HeapDumpPath`[1] option?</div><div><br></div><div>Our use-case entails ensuring the created path is known beforehand to running the JVM itself, and this is ensured by using `mktemp`[2]. In short, because of how `mktemp` works, it will create an empty file to mark it used; this fact is used to ensure there are no name collisions, as it will simply re-generate a file name until it finds a non-existent file. We would like to preserve this ability (meaning we cannot use the "unsafe" option `--dry-run`).</div><div><br></div><div>Feel free to move me to another mailing list if I chose the wrong one. I figure it was either this one or hotspot-runtime-dev@.</div><div><br></div><div>Cheers,</div><div>Mariell Hoversholm (she/they)</div><div></div><div><br></div><div>[1]: <a href="https://github.com/openjdk/jdk17u/blob/d5fedc5b5fdfaa852894b6374873012645576f15/src/hotspot/share/runtime/globals.hpp#L537-L540" target="_blank">https://github.com/openjdk/jdk17u/blob/d5fedc5b5fdfaa852894b6374873012645576f15/src/hotspot/share/runtime/globals.hpp#L537-L540</a></div><div>[2]: <a href="https://manpages.debian.org/buster/coreutils/mktemp.1.en.html" target="_blank">https://manpages.debian.org/buster/coreutils/mktemp.1.en.html</a></div></div>
</div></div>