RFR: 8279797: JFR: Show .jfc options in JFR.start help
Erik Gahlin
egahlin at openjdk.java.net
Fri Jan 14 03:58:44 UTC 2022
Hi,
Could I have review of an enhancement that shows available .jfc options in the help text for JFR.start. I also fixed a typo.
I choose to return an empty string if the default.jfc or profile.jfc can't be parsed. This could potentially happen if a user modifies files in JAVA_HOME/lib/jfr. An alternative would be to return an error message in the help text, but I think it would be hard for users to understand. Likely they think the text describes the command somehow. When they use JFR.start, they will get a parse failure, and it's much more easier to understand that point.
This PR has a conflict with https://github.com/openjdk/jdk/pull/7066, so "new JFCModel(s, l -> {});" might need to be changed to "JFCModel.create(s, l -> {});" before checking in.
Testing: jdk/jdk/jfr
Thanks
Erik
-------------
Commit messages:
- Add logging
- Initial
Changes: https://git.openjdk.java.net/jdk/pull/7073/files
Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=7073&range=00
Issue: https://bugs.openjdk.java.net/browse/JDK-8279797
Stats: 28 lines in 1 file changed: 25 ins; 0 del; 3 mod
Patch: https://git.openjdk.java.net/jdk/pull/7073.diff
Fetch: git fetch https://git.openjdk.java.net/jdk pull/7073/head:pull/7073
PR: https://git.openjdk.java.net/jdk/pull/7073
More information about the hotspot-jfr-dev
mailing list