RFR(S): 8195819: Remove recording=x from jcmd JFR.check output

Erik Gahlin erik.gahlin at oracle.com
Sat May 19 17:39:10 UTC 2018


Hi,

Could I please have a review of this fix. Today the output from the 
diagnostic command JFR.check looks like this:

Recording: recording=2 name="Recording-2" maxsize=250,0MB (running)

Recording: recording=1 name="test" maxsize=250,0MB (running)

which gives the impression that recording is still a valid parameter, 
like name and maxsize. Furthermore, the name "Recording-1" is generated 
when you run JFR.start, but it is cumbersome to write when using 
JFR.stop or JFR.dump. The fix is to change the output to:

Recording 1: name=test maxsize=250,0MB (running)

Recording 2: name=2 maxsize=250,0MB (running)

This means JFR.check will work similar to JFR.start, JFR.stop, and 
JFR.dump. For instance, the output from JFR.start looks like this:

$ jcmd <pid> JFR.start name=test

Started recording 1. No limit specified, using maxsize=250MB as default.

Use JFR.dump name=test filename=FILEPATH to copy recording data to file.


$ jcmd <pid> JFR.start

Started recording 2. No limit specified, using maxsize=250MB as default.

Use JFR.dump name=2 filename=FILEPATH to copy recording data to file.


By default the name is the ID, but the user can override it with a 
custom name.

Also, the recordings for JFR.check will be sorted by ID instead of by 
name. This has the benefit that you can see in which order the 
recordings were started. Tests have been updated accommodate for the 
changed output, and an obsolete test method was removed as well.

Webrev:
http://cr.openjdk.java.net/~egahlin/8195819.1/

Bug:
https://bugs.openjdk.java.net/browse/JDK-8195819

Testing: tests in /test/jdk/jdk/jfr

Thanks
Erik


More information about the hotspot-jfr-dev mailing list