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.
WithJDK-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
[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
[~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
- relates to
-
JDK-8364638 Refactor and make accumulated GC CPU time code generic
-
- Resolved
-