Adding -XX option for overwriting HeapDumpPath
Mariell Hoversholm
mariellh at spotify.com
Mon Nov 21 14:50:57 UTC 2022
On Mon, Nov 21, 2022 at 3:39 PM Aleksey Shipilev wrote:
> It is technically simple to do: define a flag in globals.hpp and pass it
in HeapDumper::dump_heap to
> HeapDumper::dump, which already takes "overwrite" argument. But the
larger question is if this
> warrants the extension of (product) flag set. Once we add the flag, it
adds up to maintenance costs,
> and would require multiple JDK releases to get rid of, once unused.
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.
> Is your use case specifically about HeapDumpOnOutOfMemoryError?
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.
Cheers,
Mariell
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/hotspot-dev/attachments/20221121/1adf1585/attachment.htm>
More information about the hotspot-dev
mailing list