On Wed, 10 Apr 2024 13:03:40 GMT, Matthias Baesken <mbaes...@openjdk.org> wrote:
> > One other thing I just realized is that if we go through with this change, > > then we can't in the future change VM.heap_dump so it can be used without > > any filename (make it use a default filename when no filename is > > specified). Setting HeapDumpPath would override this default filename, and > > it would be really confusing to the user when suddenly heap dumps are not > > appearing in the default location with the default name because someone > > decided to specify HeapDumpPath when launching the JVM. > > Isn't this the case already for the -XX:+HeapDumpBeforeFullGC, > -XX:+HeapDumpAfterFullGC scenarios? But probably it should be decided first > if such a default is planned for VM.heap_dump . I don't think so, but maybe I'm misunderstanding your point. It may be desirable to have VM.heap_dump support not specifying a filename and instead just have it choose a default name and path, probably the current working directory with a name something like java_pid<pid>.hprof. However, having this default and also using HeapDumpPath if set conflict with each other. Someone could be relying on the VM.heap_dump default, and then suddenly that default is no longer honored because HeapDumpPath was added to the command line. I don't see -XX:+HeapDumpBeforeFullGC or -XX:+HeapDumpAfterFullGC playing a roll in this scenario. ------------- PR Comment: https://git.openjdk.org/jdk/pull/18190#issuecomment-2048132997