RFR: 8275375: [REDO] JDK-8271949 dumppath in -XX:FlightRecorderOptions does not affect [v3]
Yasumasa Suenaga
ysuenaga at openjdk.java.net
Tue Oct 26 05:29:09 UTC 2021
On Mon, 25 Oct 2021 16:50:12 GMT, Erik Gahlin <egahlin at openjdk.org> wrote:
>> Yasumasa Suenaga has updated the pull request incrementally with one additional commit since the last revision:
>>
>> Propagate IOException at setDumpPath() to the caller
>
> When I run "java -XX:FlightRecorderOptions:dumppath=incorrect" there seems to be a missing line break between "Cannot write JFR emergency dump to incorrect" and "Error occurred during initialization of VM"
>
> When I try "$ jcmd <pid> JFR.configure" I see "Repository path: N/A", which is perhaps OK. Then I run "jcmd <pid> JFR.configure dumppath=/directory/somewhere" and it prints "Dump path: /directory/somewhere", but when I run JFR.configure again, it still prints "Repository path: N/A"
>
> Tests passes.
@egahlin Thanks for your report ! I pushed several commits, and they work fine with jdk/jfr tests on my Linux x64.
> When I run "java -XX:FlightRecorderOptions:dumppath=incorrect" there seems to be a missing line break between "Cannot write JFR emergency dump to incorrect" and "Error occurred during initialization of VM"
I fixed it in https://github.com/openjdk/jdk/pull/6000/commits/e9e9d60543a01678125a92da838cb059feb8ad16 . However, I think all we have to do is clear the exception in following code because the exception will be recorded to UL as error level.
```c++
if (HAS_PENDING_EXCEPTION) {
java_lang_Throwable::print(PENDING_EXCEPTION, tty);
CLEAR_PENDING_EXCEPTION;
tty->cr(); // java_lang_Throwable::print will not print '\n'
return false;
}
> When I try "$ jcmd JFR.configure" I see "Repository path: N/A", which is perhaps OK. Then I run "jcmd JFR.configure dumppath=/directory/somewhere" and it prints "Dump path: /directory/somewhere", but when I run JFR.configure again, it still prints "Repository path: N/A"
Originally dump path would not be reported to the user. I added it in https://github.com/openjdk/jdk/pull/6000/commits/42633f225b529b4b2eb54563e7f838164c7162cd .
-------------
PR: https://git.openjdk.java.net/jdk/pull/6000
More information about the hotspot-jfr-dev
mailing list