RFR: 8288783: JFR: Error messages are confusing when options conflict in -XX:StartFlightRecording

Chihiro Ito chiroito107 at gmail.com
Thu Oct 6 07:36:18 UTC 2022


Could you review this fix to make the error message more user friendly,
please?

Regards,
Chihiro

2022年6月28日(火) 15:55 Chihiro Ito <cito at openjdk.org>:

> Could I have a review of PR that fixes incorrect error messages regarding
> of recording.
>
> The current message is very confusing. If a user types jcmd <pid>
> JFR.start name=abc name=def or java
> --XX:StartFlightRecording=name=abc,name=def,  the error message says
> "Duplicates in diagnostic command arguments", but doesn't know what options
> are duplicated.
> Furthermore, if a user specifies two or three duplicate parameters, the
> same logs will be output.
>
> It should say follows,
> Option name can only be specified once with starting flight recording
> Options name and disk can only be specified once with starting flight
> recording
> Options name, disk and maxage can only be specified once with starting
> flight recording
> This problem affects --XX:StartFlightRecording, jcmd JFR.start, JFR.stop,
> JFR.dump, JFR.check, and MBean.
>
> For other than start, the output is as follows, (example of dump)
> Option name can only be specified once with dumping flight recording
>
> Testing: jdk/jdk/jfr
>
> Thanks
> Chihiro
>
> -------------
>
> Commit messages:
>  - modify whitespace from windows to linux
>  - modify copyright
>  - Modify log message and test case
>  - JDK-8288783 Initial
>
> Changes: https://git.openjdk.org/jdk/pull/9302/files
>  Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=9302&range=00
>   Issue: https://bugs.openjdk.org/browse/JDK-8288783
>   Stats: 442 lines in 10 files changed: 431 ins; 2 del; 9 mod
>   Patch: https://git.openjdk.org/jdk/pull/9302.diff
>   Fetch: git fetch https://git.openjdk.org/jdk pull/9302/head:pull/9302
>
> PR: https://git.openjdk.org/jdk/pull/9302
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/hotspot-jfr-dev/attachments/20221006/5e3769dc/attachment.htm>


More information about the hotspot-jfr-dev mailing list