8287800: JFR: Incorrect error message when starting recording with missing .jfc file #43
Conversation
👋 Welcome back egahlin! A progress list of the required criteria for merging this PR into |
/label remove build |
@egahlin |
@egahlin This change now passes all automated pre-integration checks. ℹ️ This project also has non-automated pre-integration requirements. Please see the file CONTRIBUTING.md for details. After integration, the commit message for the final commit will be:
You can use pull request commands such as /summary, /contributor and /issue to adjust it as needed. At the time when this comment was updated there had been 3 new commits pushed to the
Please see this link for an up-to-date comparison between the source branch of this pull request and the ➡️ To integrate this PR with the above commit message to the |
/integrate |
Going to push as commit 1cf83a4.
Your commit was automatically rebased without conflicts. |
Could I have a review of PR that fixes incorrect error messages when starting a recording.
The current message is very confusing. If a user types
jcmd <pid> JFR.start settings=my.jfc
, but doesn't realise that the path should be relative to where the JVM started, the error message says "Could not parse settings file custom.jfc"It should say "Could not find file custom.jfc"
Furthermore, if a user specifies
settings=default.jfc settings=my.jfc
to get settings from two files, the error message will say "Could not parse file default.jfc", even though it was my.jfc it was unable to find.This problem impacts
jfr configure
,-XX:StartFlightRecording
andJFR.start
. Code has been refactored so error formatting now happens per file and in one place with a proper verb ("find", "parse", "use", "access", "open"). Error messages from the parser are also propagated, for example: "Could not parse file 'my.jfc". Expected root element to be named 'configuration'"Testing: jdk/jdk/jfr
Thanks
Erik
Progress
Issue
Reviewers
Reviewing
Using
git
Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk19 pull/43/head:pull/43
$ git checkout pull/43
Update a local copy of the PR:
$ git checkout pull/43
$ git pull https://git.openjdk.org/jdk19 pull/43/head
Using Skara CLI tools
Checkout this PR locally:
$ git pr checkout 43
View PR using the GUI difftool:
$ git pr show -t 43
Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk19/pull/43.diff