RFR: 8288783: JFR: Error messages are confusing when options conflict in -XX:StartFlightRecording [v7]
Erik Gahlin
egahlin at openjdk.org
Wed Feb 8 14:43:00 UTC 2023
On Wed, 8 Feb 2023 13:18:27 GMT, Chihiro Ito <cito at openjdk.org> wrote:
>> 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
>
> Chihiro Ito has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains 11 additional commits since the last revision:
>
> - Merge branch 'openjdk:master' into 8288783
> - to simplify tests
> - Update test/jdk/jdk/jfr/startupargs/TestStartupOptionSpecifiedOnce.java
>
> Co-authored-by: Andrey Turbanov <turbanoff at gmail.com>
> - Update src/jdk.jfr/share/classes/jdk/jfr/internal/dcmd/ArgumentParser.java
>
> Co-authored-by: Andrey Turbanov <turbanoff at gmail.com>
> - Update test/jdk/jdk/jfr/jcmd/TestJcmdOptionSpecifiedOnce.java
>
> Co-authored-by: Andrey Turbanov <turbanoff at gmail.com>
> - reverting file headers
> - eliminating complication such as outputting commands, and changing how to build log messages
> - modify whitespace from windows to linux
> - modify copyright
> - Modify log message and test case
> - ... and 1 more: https://git.openjdk.org/jdk/compare/45ce5690...d276c4db
Marked as reviewed by egahlin (Reviewer).
-------------
PR: https://git.openjdk.org/jdk/pull/9302
More information about the hotspot-jfr-dev
mailing list