This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-Xlog: | |
// selections | |
codecache+sweep*=trace, | |
class+unload, // TraceClassUnloading | |
class+load, // TraceClassLoading | |
os+thread, | |
safepoint, // TraceSafepoint | |
gc*, // PrintGCDetails | |
gc+stringdedup=debug, // PrintStringDeduplicationStatistics | |
gc+ergo*=trace, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-XX:+PrintGCDetails \ // gc* | |
-XX:+PrintGCApplicationStoppedTime \ // safepoint | |
-XX:+PrintGCApplicationConcurrentTime \ // safepoint | |
-XX:+PrintGCCause \ // default output | |
-XX:+PrintGCID \ // default output | |
-XX:+PrintTenuringDistribution \ // gc+age*=trace | |
-XX:+PrintGCDateStamps \ // :time,tags,level | |
-XX:+UseGCLogFileRotation \ // :filecount=5,filesize=10M | |
-XX:NumberOfGCLogFiles=5 \ // :filecount=5,filesize=10M | |
-XX:GCLogFileSize=10M \ // :filecount=5,filesize=10M |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ java -Xlog:gc+heap=debug -cp . G1GCDemo01 | |
[0.004s][debug][gc,heap] Minimum heap 8388608 Initial heap 268435456 Maximum heap | |
hello, g1gc! | |
[12.263s][debug][gc,heap] GC(0) Heap before GC invocations=0 (full 0): | |
[12.265s][debug][gc,heap] GC(0) garbage-first heap | |
[12.265s][debug][gc,heap] GC(0) region size 2048K, 1 young (2048K) | |
[12.265s][debug][gc,heap] GC(0) Metaspace used 3678K | |
[12.265s][debug][gc,heap] GC(0) class space used 300K | |
[12.280s][debug][gc,heap] GC(0) Uncommittable regions after shrink: 124 | |
[0.122s][debug][gc, ergo, refine] Initial Refinement Zones: green: 23, yellow: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ java -Xlog:gc+heap=debug -cp . G1GCDemo01 | |
[0.004s][debug][gc,heap] Minimum heap 8388608 Initial heap 268435456 Maximum heap | |
hello, g1gc! | |
[12.263s][debug][gc,heap] GC(0) Heap before GC invocations=0 (full 0): | |
[12.265s][debug][gc,heap] GC(0) garbage-first heap | |
[12.265s][debug][gc,heap] GC(0) region size 2048K, 1 young (2048K) | |
[12.265s][debug][gc,heap] GC(0) Metaspace used 3678K | |
[12.265s][debug][gc,heap] GC(0) class space used 300K | |
[12.280s][debug][gc,heap] GC(0) Uncommittable regions after shrink: 124 | |
[0.122s][debug][gc, ergo, refine] Initial Refinement Zones: green: 23, yellow: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CMSDumpAtPromotionFailure, | |
CMSPrintEdenSurvivorChunks, | |
GlLogLevel, | |
G1PrintHeapRegions, | |
G1PrintRegionLivenessInfo, | |
G1SummarizeConcMark, | |
G1SummarizeRSetStats, | |
G1TraceConcRefinement, | |
G1TraceEagerReclaimHumongousObjects, | |
G1TraceStringSymbolTableScrubbing, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
java -XX:+PrintGCDetails -version | |
[0.001s][warning][gc] -XX:+PrintGCDetails is deprecated. Will use -Xlog:gc* instead. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
java -XX:+PrintGCDetails -version | |
[0.001s][warning][gc] -XX:+PrintGCDetails is deprecated. Will use -Xlog:gc* instead. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[2022-06-15T19:54:01.529+0800][0.001s][5235][info ][os,thread] Thread attached | |
[2022-06-15T19:54:01.529+0800][0.001s][5235][debug][os,thread] Thread 5237 stack... | |
[2022-06-15T19:54:01.529+0800][0.001s][5235][debug][perf,datacreation] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ java -Xlog:all=debug:stdout:level,tags,time,uptime,pid -version | |
[2022-06-15T19:54:01.529+0800][0.001s][5235][info ][os,thread] Thread attached | |
[2022-06-15T19:54:01.529+0800][0.001s][5235][debug][os,thread] Thread 5237 stack... | |
[2022-06-15T19:54:01.529+0800][0.001s][5235][debug][perf,datacreation] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ java -Xlog:all=debug:stdout:level,tags,time,uptime,pid -version | |
[2022-06-15T19:54:01.529+0800][0.001s][5235][info ][os,thread] Thread attached | |
[2022-06-15T19:54:01.529+0800][0.001s][5235][debug][os,thread] Thread 5237 stack... | |
[2022-06-15T19:54:01.529+0800][0.001s][5235][debug][perf,datacreation] |