RFR: 8275375: [REDO] JDK-8271949 dumppath in -XX:FlightRecorderOptions does not affect
Erik Gahlin
egahlin at openjdk.java.net
Tue Oct 19 02:43:46 UTC 2021
On Tue, 19 Oct 2021 02:13:01 GMT, Yasumasa Suenaga <ysuenaga at openjdk.org> wrote:
> This PR is for redo-ing [JDK-8271949](https://bugs.openjdk.java.net/browse/JDK-8271949).
> I changed to use `SecuritySupport` at `Options::setDumpPath` as @egahlin mentioned. Please see change both Options.java and SecuritySupport.java .
>
> I've tested this change with all jdk/jfr tests on Linux x64, and they works fine.
> @egahlin @mgronlun Can you run Mach5 tests with this change?
There are three ways setDumpPath is used:
1) When JFR is initialized
2) jcmd JFR.configure dumppath=<path>
3) -XX:FllightRecorderOptions:dumppath=<path>
If something goes wrong (IOException/InvalidPathException) when doing 2 or 3, users should ideally be informed, so they can correct it, at command-line or jcmd. Perhaps throw DCmdException?
Do we really need to resolve for 1? Can we handle it in native, similar to what we already do with hs_err_pid (which is not resolved in Java). For example, null could be used to indicate that the working directory should be used.
I think we first need to nail the design, before doing the implementation.
-------------
PR: https://git.openjdk.java.net/jdk/pull/6000
More information about the hotspot-jfr-dev
mailing list