JDK-8225049 : Bad -Xlog example in -Xlog:help, online documentation, JEP
  • Type: Bug
  • Component: tools
  • Sub-Component: launcher
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2019-05-30
  • Updated: 2024-09-16
  • Resolved: 2024-09-11
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 24
24 b15Fixed
Related Reports
Relates :  
Description
Several "examples" in the documentation and help messages for -Xlog use the decorator "pids", which should be "pid".

Example example:
 "-Xlog:gc=trace:file=gctrace.txt:uptimemillis,pids:filecount=5,filesize=1024

    Logs messages tagged with the gc tag using the trace level to a rotating file set with 5 files with size 1 MB with the base name gctrace.txt and uses decorations uptimemillis and pid."

Results in "Invalid -Xlog option"...

See:
$ java -Xlog:help

https://docs.oracle.com/en/java/javase/12/tools/java.html#GUID-BE93ABDC-999C-4CB5-A88B-1994AAAC74D5

https://openjdk.java.net/jeps/158



Comments
Changeset: 07643237 Branch: master Author: Jaikiran Pai <jpai@openjdk.org> Date: 2024-09-11 01:19:15 +0000 URL: https://git.openjdk.org/jdk/commit/07643237d4a9c2da8a43dbdf0c6b32215827b741
11-09-2024

I have corrected the JEP text too.
10-09-2024

The -Xlog:help typo was fixed by JDK-8215398
10-09-2024

The incorrect output from: > $ java -Xlog:help where it used to print "pids" instead of "pid" was addressed in https://bugs.openjdk.org/browse/JDK-8215398. I've now opened a PR to address the java specification page and the man pages to fix it there too.
10-09-2024

A pull request was submitted for review. Branch: master URL: https://git.openjdk.org/jdk/pull/20934 Date: 2024-09-10 13:30:56 +0000
10-09-2024