RFR: 8270091: The path of JFR emergency dump should be able to specified by the user

Yasumasa Suenaga ysuenaga at openjdk.java.net
Tue Jul 27 10:37:32 UTC 2021


On Mon, 26 Jul 2021 12:02:34 GMT, Erik Gahlin <egahlin at openjdk.org> wrote:

> Looks like dumppath is missing from jfrOptionSet.cpp, but it is available in JfrConfigureFlightRecorderDCmd. Maybe add dumppath to jfrOptionSet.cpp as well. 

Yes, we can set dump path through DCmdConfigure.java, but it does not affect in emergency dump. You can see it on my change. Current code depends on `get_current_directory()` and it would set current work directory to `_path_buffer` which is used to create emergency dump path.

https://github.com/openjdk/jdk/pull/4724/files#diff-15c477185d0cbf25cba845a37f22373dd7404997e1d7baef296dfbb46da48a9dL108

> That said, beware that the option will be removed in an upcoming release when -XX:StartFlightRecording:filename supports crash dumps.

So may I change this PR to use `filename` for emergency dump? Of course I will withdraw CSR about this.
I can remove `dumppath` subsequently in another ticket.

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

PR: https://git.openjdk.java.net/jdk/pull/4724


More information about the hotspot-jfr-dev mailing list