Using Adoptium Temurin Java 11 and G1 GC settings of
-XX:+UseG1GC -XX:+DisableExplicitGC -verbosegc -Xlog:gc*,safepoint=debug:file=${GCFILENAME}:tags,time,uptime,level:filecount=10,filesize=10M -XX:-OmitStackTraceInFastThrow -XX:+PrintClassHistogram
We get output like this (omitting the leading time info on each line):
[info ][safepoint ] Entering safepoint region: G1CollectForAllocation
[info ][gc,start ] GC(5342) Pause Young (Prepare Mixed) (G1 Evacuation Pause)
[info ][gc,task ] GC(5342) Using 4 workers of 4 for evacuation
[info ][gc,phases ] GC(5342) Pre Evacuate Collection Set: 0.1ms
[info ][gc,phases ] GC(5342) Evacuate Collection Set: 94.8ms
[info ][gc,phases ] GC(5342) Post Evacuate Collection Set: 48.9ms
[info ][gc,phases ] GC(5342) Other: 2.7ms
[info ][gc,heap ] GC(5342) Eden regions: 1521->0(50)
[info ][gc,heap ] GC(5342) Survivor regions: 15->78(192)
[info ][gc,heap ] GC(5342) Old regions: 442->442
[info ][gc,heap ] GC(5342) Humongous regions: 214->0
[info ][gc,metaspace ] GC(5342) Metaspace: 80251K(87856K)->80251K(87856K) NonClass: 72293K(77488K)->72293K(77488K) Class: 7957K(10368K)->7957K(10368K)
[info ][gc ] GC(5342) Pause Young (Prepare Mixed) (G1 Evacuation Pause) 4382M->1040M(5120M) 146.102ms
[info ][gc,cpu ] GC(5342) User=0.56s Sys=0.01s Real=0.15s
[info ][safepoint ] Leaving safepoint region
I was trying to find explanations of each line of output. I found one article from 2016 that mentioned just settings of { -Xloggc:/home/gc.log -XX:+PrintGCDetails -XX:+PrintGCDateStamps
} would give output lines including information like:
[Eden: 12.0M(12.0M)->0.0B(14.0M) Survivors: 0.0B->2048.0K Heap: 12.6M(252.0M)->7848.3K(252.0M)]
I’ve got more sets of lines like:
[info ][safepoint ] Entering safepoint region: Cleanup
[info ][safepoint ] Leaving safepoint region
[info ][safepoint ] Total time for which application th
[debug][safepoint ] Safepoint synchronization initiated
[info ][safepoint ] Application time: 1.0001197 seconds
than I can care to see, but I would like more byte handling/reclamation details. And some interpretation of the output (like what does Eden regions: 1521->0(50)
mean?).
Does anyone know of options to get byte handling details and documents on interpreting the output lines? Thank you.
I’ve tried G1 Logging debug level and -verbosegc. I tried trace level and that’s WAY too much detail to be able to sift through and archive.
Jay Turner is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.