JDK-8365979 : Make GCTraceCPUTime log message context-free
  • Type: Enhancement
  • Component: hotspot
  • Sub-Component: gc
  • Priority: P4
  • Status: Open
  • Resolution: Unresolved
  • Submitted: 2025-08-22
  • Updated: 2025-08-25
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.
Other
tbdUnresolved
Related Reports
Relates :  
Description
Serial, Parallel and G1 uses GCTraceCPUTime to estimate GC CPU time spent in STW, e.g. 

[2.795s][info ][gc,cpu         ] GC(0) User=1.04s Sys=0.01s Real=0.16s

This constraint may however be less obvious as one needs to match the GC cycle number to a log line that describes what type of GC cycle the current number matches. When using -Xlog:gc+cpu, such type information is not provided, making it impossible to associate a cycle number with its GC type.

With JDK-8364638 (which prints a table of CPU time information) it may be beneficial to make this log message more context-free to avoid user confusion as CPU time numbers in that patch includes more than just pauses. Moreover, it may be beneficial for GC log parsing to have the GC cycle type on the same line.

[~tschatzl] suggested that the message could look something along these lines:

[2.795s][info ][gc,cpu         ] GC(0) Pause [Young|Full|Remark|Cleanup]: User=1.04s Sys=0.01s Real=0.16s