其他分享
首页 > 其他分享> > 各类GC日志格式

各类GC日志格式

作者:互联网

各类GC日志格式

SerialNew+SerialOld

printgc

java -XX:+UseSerialGC -Xms1M -Xmx1M -XX:+PrintGCDetail com/sewell/Gc_Test_Application
[GC (Allocation Failure)  1225K->1067K(1984K), 0.0010898 secs]
# ygc阶段(回收原因-给对象分配内存失败) 堆区回收前大小->回收后大小(总堆区的大小)耗费时间
[Full GC (Allocation Failure)  1983K->1983K(1984K), 0.0046835 secs]
Exception in thread "main" [Full GC (Allocation Failure)  1983K->1983K(1984K), 0.0047283 secs]
#FullGC阶段(分配内存失败)
[Full GC (Allocation Failure)  1983K->1982K(1984K), 0.0061336 secs]
java.lang.OutOfMemoryError: Java heap space
[Full GC (Allocation Failure)  1983K->1983K(1984K), 0.0060551 secs]
[Full GC (Allocation Failure)  1983K->1983K(1984K), 0.0052075 secs]

Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread "main"
[Full GC (Allocation Failure)  1983K->1980K(1984K), 0.0054260 secs]
[Full GC (Allocation Failure)  1983K->1981K(1984K), 0.0049733 secs]

printgcdetail

java -XX:+UseSerialGC -Xms1M -Xmx1M -XX:+PrintGCDetails com/sewell/Gc_Test_Application
[GC (Allocation Failure) [DefNew: 576K->64K(576K), 0.0012129 secs] 1024K->713K(1984K), 0.0012514 secs] [Times: user=0.00 sys=0.00, real=0.00 secs] 
#[GC(分配失败原因)][新生代:回收前->回收后(新生代总大小) 花费时间] 总堆回收前->回收后(总堆大小) 花费时间   用户态时间 内核态时间 真实时间
[GC (Allocation Failure) [DefNew: 576K->64K(576K), 0.0012559 secs] 1225K->1149K(1984K), 0.0012954 secs] [Times: user=0.00 sys=0.00, real=0.00 secs] 
[GC (Allocation Failure) [DefNew: 576K->576K(576K), 0.0000094 secs][Tenured: 1085K->1167K(1408K), 0.0041213 secs] 1661K->1167K(1984K), [Metaspace: 3839K->3839K(1056768K)], 0.0041784 secs] [Times: user=0.00 sys=0.00, real=0.00 secs] 
[GC (Allocation Failure) [DefNew: 512K->512K(576K), 0.0000183 secs][Tenured: 1167K->1397K(1408K), 0.0079843 secs] 1679K->1397K(1984K), [Metaspace: 3834K->3834K(1056768K)], 0.0080842 secs] [Times: user=0.01 sys=0.00, real=0.01 secs] 
[Full GC (Allocation Failure) [Tenured: 1408K->1407K(1408K), 0.0056201 secs] 1983K->1982K(1984K), [Metaspace: 3835K->3835K(1056768K)], 0.0056468 secs] [Times: user=0.01 sys=0.00, real=0.00 secs] 
#[FUll GC(内存分配失败)] [老年代:回收前大小->回收后大小(老年代总大小) 消耗时间]
#回收前堆大小->回收后堆大小(总堆大小),[元空间:回收前大小->回收后大小(总大小1031M)]
Exception in thread "main" [Full GC (Allocation Failure) [Tenured: 1407K->1407K(1408K), 0.0049880 secs] 1983K->1983K(1984K), [Metaspace: 3859K->3859K(1056768K)], 0.0050152 secs] [Times: user=0.01 sys=0.00, real=0.01 secs] 
java.lang.OutOfMemoryError: Java heap space
[Full GC (Allocation Failure) [Tenured: 1407K->1407K(1408K), 0.0058638 secs] 1983K->1983K(1984K), [Metaspace: 3860K->3860K(1056768K)], 0.0059018 secs] [Times: user=0.00 sys=0.00, real=0.01 secs] 
[Full GC (Allocation Failure) [Tenured: 1407K->1407K(1408K), 0.0047625 secs] 1983K->1982K(1984K), [Metaspace: 3866K->3866K(1056768K)], 0.0047859 secs] [Times: user=0.01 sys=0.00, real=0.01 secs] 
Heap
 def new generation   total 576K, used 575K [0x00000000ffe00000, 0x00000000ffea0000, 0x00000000ffea0000)
 #新生代  总大小 576k 已经使用 575k 块起始位置 用到的位置 结束的位置
  eden space 512K, 100% used [0x00000000ffe00000, 0x00000000ffe80000, 0x00000000ffe80000)
  #eden区  大小512k 使用率100% 块起始位置 用到的位置 结束的位置
  from space 64K,  99% used [0x00000000ffe90000, 0x00000000ffe9ffa0, 0x00000000ffea0000)
  #from区
  to   space 64K,   0% used [0x00000000ffe80000, 0x00000000ffe80000, 0x00000000ffe90000)
  #to区
 tenured generation   total 1408K, used 1407K [0x00000000ffea0000, 0x0000000100000000, 0x0000000100000000)
 #老年代
   the space 1408K,  99% used [0x00000000ffea0000, 0x00000000fffffff8, 0x0000000100000000, 0x0000000100000000)
   
 Metaspace       used 3868K, capacity 4644K, committed 4864K, reserved 1056768K
 #元空间        已经使用3868K 总容量4644K 虚拟内存占用4864K  虚拟内存保留1056768K
  class space    used 421K, capacity 455K, committed 512K, reserved 1048576K


parallelscavange+parallel old

printgc

java -Xms1M -Xmx1M -XX:+PrintGC -XX:+UseParallelGC com/sewell/Gc_Test_Application
[GC (Allocation Failure)  940K->512K(1536K), 0.0017860 secs]
[GC (Allocation Failure)  1024K->712K(1536K), 0.0019692 secs]
[GC (Allocation Failure) -- 1224K->1512K(1536K), 0.0026110 secs]
[Full GC (Ergonomics)  1512K->483K(1536K), 0.0103190 secs]
[Full GC (Ergonomics)  995K->543K(1536K), 0.0115443 secs]
[Full GC (Ergonomics)  994K->747K(1536K), 0.0123038 secs]
[Full GC (Ergonomics)  1023K->1023K(1536K), 0.0145739 secs]
[Full GC (Ergonomics)  1023K->1023K(1536K), 0.0172462 secs]
[Full GC (Allocation Failure)  1023K->1023K(1536K), 0.0149320 secs]
[Full GC (Ergonomics)  1023K->1019K(1536K), 0.0131135 secs]
Exception in thread "main" java.lang.OutOfMemoryError: Java heap space
[Full GC (Ergonomics)  1021K->1020K(1536K), 0.0137389 secs]
        at com.sewell.T15_FullGC_Problem01.getAllCardInfo(T15_FullGC_Problem01.java:53)
        at com.sewell.T15_FullGC_Problem01.modelFit(T15_FullGC_Problem01.java:38)
[Full GC (Ergonomics)  1023K->1021K(1536K), 0.0132893 secs]
        at com.sewell.T15_FullGC_Problem01.main(T15_FullGC_Problem01.java:32)
[Full GC (Ergonomics)  1022K->1019K(1536K), 0.0132948 secs]

printgcdetails

java -Xms1M -Xmx1M -XX:+PrintGCDetails -XX:+UseParallelGC com/sewell/Gc_Test_Application
[GC (Allocation Failure) [PSYoungGen: 928K->432K(1024K)] 928K->432K(1536K), 0.0015300 secs] [Times: user=0.01 sys=0.00, real=0.00 secs] 
[GC (Allocation Failure) [PSYoungGen: 940K->496K(1024K)] 940K->512K(1536K), 0.0017295 secs] [Times: user=0.00 sys=0.00, real=0.00 secs] 
[GC (Allocation Failure) [PSYoungGen: 1008K->512K(1024K)] 1024K->708K(1536K), 0.0020370 secs] [Times: user=0.00 sys=0.00, real=0.00 secs] 
[GC (Allocation Failure) --[PSYoungGen: 1024K->1024K(1024K)] 1220K->1532K(1536K), 0.0022515 secs] [Times: user=0.00 sys=0.00, real=0.00 secs] 
[Full GC (Ergonomics) [PSYoungGen: 1024K->0K(1024K)] [ParOldGen: 508K->504K(512K)] 1532K->504K(1536K), [Metaspace: 3834K->3827K(1056768K)], 0.0095356 secs] [Times: user=0.01 sys=0.00, real=0.01 secs] 
[Full GC (Ergonomics) [PSYoungGen: 512K->61K(1024K)] [ParOldGen: 504K->503K(512K)] 1016K->564K(1536K), [Metaspace: 3832K->3832K(1056768K)], 0.0109913 secs] [Times: user=0.01 sys=0.00, real=0.01 secs] 
[Full GC (Allocation Failure) [PSYoungGen: 511K->511K(1024K)] [ParOldGen: 512K->512K(512K)] 1023K->1023K(1536K), [Metaspace: 3833K->3833K(1056768K)], 0.0116244 secs] [Times: user=0.01 sys=0.00, real=0.01 secs] 
[Full GC (Ergonomics) [PSYoungGen: 511K->511K(1024K)] [ParOldGen: 512K->507K(512K)] 1023K->1019K(1536K), [Metaspace: 3833K->3833K(1056768K)], 0.0148005 secs] [Times: user=0.01 sys=0.00, real=0.01 secs] 
[Full GC (Ergonomics) [PSYoungGen: 511K->511K(1024K)] [ParOldGen: 507K->507K(512K)] 1019K->1019K(1536K), [Metaspace: 3833K->3833K(1056768K)], 0.0151930 secs] [Times: user=0.02 sys=0.00, real=0.02 secs] 
Exception in thread "main" [Full GC (Ergonomics) [PSYoungGen: 511K->511K(1024K)] [ParOldGen: 507K->507K(512K)] 1019K->1019K(1536K), [Metaspace: 3836K->3836K(1056768K)], 0.0152567 secs] [Times: user=0.01 sys=0.00, real=0.01 secs] 
[Full GC (Ergonomics) [PSYoungGen: 512K->511K(1024K)] [ParOldGen: 507K->507K(512K)] 1019K->1019K(1536K), [Metaspace: 3837K->3837K(1056768K)], 0.0177911 secs] [Times: user=0.02 sys=0.00, real=0.01 secs] 
java.lang.OutOfMemoryError: Java heap space
        at com.sewell.T15_FullGC_Problem01$CardInfo.<init>(T15_FullGC_Problem01.java:20)
[Full GC (Ergonomics) [PSYoungGen: 512K->511K(1024K)] [ParOldGen: 511K->509K(512K)] 1023K->1021K(1536K), [Metaspace: 3858K->3858K(1056768K)], 0.0175173 secs] [Times: user=0.02 sys=0.00, real=0.02 secs] 
        at com.sewell.T15_FullGC_Problem01$CardInfo.<init>(T15_FullGC_Problem01.java:16)
        at com.sewell.T15_FullGC_Problem01.getAllCardInfo(T15_FullGC_Problem01.java:53)
[Full GC (Ergonomics) [PSYoungGen: 512K->511K(1024K)] [ParOldGen: 511K->509K(512K)] 1023K->1021K(1536K), [Metaspace: 3858K->3858K(1056768K)], 0.0160886 secs] [Times: user=0.01 sys=0.00, real=0.02 secs] 
        at com.sewell.T15_FullGC_Problem01.modelFit(T15_FullGC_Problem01.java:38)
        at com.sewell.T15_FullGC_Problem01.main(T15_FullGC_Problem01.java:32)
[Full GC (Ergonomics) [PSYoungGen: 512K->511K(1024K)] [ParOldGen: 511K->507K(512K)] 1023K->1019K(1536K), [Metaspace: 3858K->3858K(1056768K)], 0.0165887 secs] [Times: user=0.02 sys=0.00, real=0.02 secs] 
[Full GC (Ergonomics) [PSYoungGen: 512K->511K(1024K)] [ParOldGen: 507K->507K(512K)] 1019K->1019K(1536K), [Metaspace: 3858K->3858K(1056768K)], 0.0149945 secs] [Times: user=0.01 sys=0.00, real=0.01 secs] 
[Full GC (Ergonomics) [PSYoungGen: 511K->511K(1024K)] [ParOldGen: 509K->507K(512K)] 1021K->1019K(1536K), [Metaspace: 3858K->3858K(1056768K)], 0.0189131 secs] [Times: user=0.02 sys=0.00, real=0.02 secs] 
[Full GC (Ergonomics) [PSYoungGen: 511K->511K(1024K)] [ParOldGen: 507K->507K(512K)] 1019K->1019K(1536K), [Metaspace: 3858K->3858K(1056768K)], 0.0153117 secs] [Times: user=0.02 sys=0.00, real=0.01 secs] 
^CHeap
 PSYoungGen      total 1024K, used 511K [0x00000000ffe80000, 0x0000000100000000, 0x0000000100000000)
  eden space 512K, 99% used [0x00000000ffe80000,0x00000000ffeffff8,0x00000000fff00000)
  from space 512K, 0% used [0x00000000fff80000,0x00000000fff80000,0x0000000100000000)
  to   space 512K, 93% used [0x00000000fff00000,0x00000000fff77a70,0x00000000fff80000)
 ParOldGen       total 512K, used 510K [0x00000000ffe00000, 0x00000000ffe80000, 0x00000000ffe80000)
  object space 512K, 99% used [0x00000000ffe00000,0x00000000ffe7f900,0x00000000ffe80000)
 Metaspace       used 3866K, capacity 4644K, committed 4864K, reserved 1056768K
  class space    used 421K, capacity 455K, committed 512K, reserved 1048576K

CMS+ParallelNew

printgc

java -Xms1M -Xmx1M -XX:+PrintGC -XX:+UseConcMarkSweepGC com/sewell/Gc_Test_Application
[GC (Allocation Failure)  1024K->435K(1920K), 0.0029592 secs]
[GC (Allocation Failure)  1459K->1649K(1920K), 0.0025349 secs]
[Full GC (Allocation Failure)  1649K->705K(1920K), 0.0033337 secs]
[GC (CMS Initial Mark)  725K(1920K), 0.0002004 secs]
[GC (CMS Final Remark)  725K(1920K), 0.0010595 secs]
[GC (CMS Initial Mark)  1190K(1920K), 0.0006256 secs]
[GC (CMS Final Remark)  1210K(1920K), 0.0016159 secs]
[Full GC (Allocation Failure)  1723K->1099K(1920K), 0.0042523 secs]
[GC (CMS Initial Mark)  1133K(1920K), 0.0004378 secs]
[GC (CMS Final Remark)  1133K(1920K), 0.0014410 secs]
[GC (CMS Initial Mark)  1830K(1920K), 0.0009750 secs]
[GC (CMS Final Remark)  1852K(1920K), 0.0019800 secs]
[Full GC (Allocation Failure)  1919K->1910K(1920K), 0.0059236 secs]
Exception in thread "main" java.lang.OutOfMemoryError: Java heap space
        at java.util.concurrent.ScheduledThreadPoolExecutor.scheduleWithFixedDelay(ScheduledThreadPoolExecutor.java:590)
        at com.sewell.T15_FullGC_Problem01.lambda$modelFit$1(T15_FullGC_Problem01.java:41)
        at com.sewell.T15_FullGC_Problem01$$Lambda$1/1418481495.accept(Unknown Source)
        at java.util.ArrayList.forEach(ArrayList.java:1257)
[Full GC (Allocation Failure)  1919K->1912K(1920K), 0.0066880 secs]
        at com.sewell.T15_FullGC_Problem01.modelFit(T15_FullGC_Problem01.java:39)
        at com.sewell.T15_FullGC_Problem01.main(T15_FullGC_Problem01.java:32)
[GC (CMS Initial Mark)  1915K(1920K), 0.0011097 secs]
[GC (CMS Final Remark)  1915K(1920K), 0.0020192 secs]
[Full GC (Allocation Failure)  1919K->1910K(1920K), 0.0064964 secs]
[GC (CMS Initial Mark)  1910K(1920K), 0.0010096 secs]
[GC (CMS Final Remark)  1910K(1920K), 0.0019510 secs]
[Full GC (Allocation Failure)  1919K->1910K(1920K), 0.0058884 secs]

printgcdetail

 java -Xms1M -Xmx1M -XX:+PrintGCDetails -XX:+UseConcMarkSweepGC com/sewell/Gc_Test_Application
[GC (Allocation Failure) [ParNew: 1024K->128K(1152K), 0.0030550 secs] 1024K->435K(1920K), 0.0031135 secs] [Times: user=0.00 sys=0.00, real=0.00 secs] 
#[GC (分配失败)][新生代回收]
[GC (Allocation Failure) [ParNew (promotion failed): 1152K->1150K(1152K), 0.0025747 secs][CMS: 499K->705K(768K), 0.0036220 secs] 1459K->705K(1920K), [Metaspace: 3804K->3804K(1056768K)], 0.0062489 secs] [Times: user=0.00
sys=0.00, real=0.01 secs] 
#promotion failed 晋升失败
[GC (CMS Initial Mark) [1 CMS-initial-mark: 705K(768K)] 726K(1920K), 0.0002042 secs] [Times: user=0.00 sys=0.00, real=0.00 secs] 
[CMS-concurrent-mark-start]
#初始标记 
#705K(768K):老年代使用(最大)
#726K(1920K):整个堆使用(最大)
[CMS-concurrent-mark: 0.001/0.001 secs] [Times: user=0.01 sys=0.00, real=0.00 secs] 
#并发标记
[CMS-concurrent-preclean-start]
[CMS-concurrent-preclean: 0.000/0.000 secs] [Times: user=0.00 sys=0.00, real=0.00 secs] 
#标记Card为dirity 也称为card marking
[GC (CMS Final Remark) [YG occupancy: 20 K (1152 K)][Rescan (parallel) , 0.0001591 secs][weak refs processing, 0.0000079 secs][class unloading, 0.0003398 secs][scrub symbol table, 0.0003537 secs][scrub string table, 0.0002005 secs][1 CMS-remark: 705K(768K)] 726K(1920K), 0.0010935 secs] [Times: user=0.00 sys=0.00, real=0.00 secs] 
#重新标记 stw阶段 YG occupancy:年轻代占用及容量
#Rescan (parallel):stw下存活的对象标记
#weak refs processing:弱饮用处理
#class unloading:卸载用不到的class
#scrub symbol table:cleaning up symbol and string tables which hold class-level metadata and internalized string respectively
#CMS-remark:705K(768K) 阶段过后的老年代(容量)
#726K(1920K):阶段过后的堆占用及容量
#
[CMS-concurrent-sweep-start]
[CMS-concurrent-sweep: 0.000/0.000 secs] [Times: user=0.00 sys=0.00, real=0.00 secs] 
#标记已经完成,进行并发清理
[CMS-concurrent-reset-start]
[CMS-concurrent-reset: 0.000/0.000 secs] [Times: user=0.00 sys=0.00, real=0.00 secs] 
#重置内部结构,为下次GC做准备
[GC (CMS Initial Mark) [1 CMS-initial-mark: 704K(768K)] 1184K(1920K), 0.0006873 secs] [Times: user=0.01 sys=0.00, real=0.00 secs] 
[CMS-concurrent-mark-start]
[CMS-concurrent-mark: 0.001/0.001 secs] [Times: user=0.00 sys=0.00, real=0.00 secs] 
[CMS-concurrent-preclean-start]
[CMS-concurrent-preclean: 0.000/0.000 secs] [Times: user=0.00 sys=0.00, real=0.00 secs] 
[GC (CMS Final Remark) [YG occupancy: 500 K (1152 K)][Rescan (parallel) , 0.0005322 secs][weak refs processing, 0.0000091 secs][class unloading, 0.0004366 secs][scrub symbol table, 0.0004128 secs][scrub string table, 0.0001991 secs][1 CMS-remark: 704K(768K)] 1204K(1920K), 0.0016241 secs] [Times: user=0.00 sys=0.00, real=0.00 secs] 
[CMS-concurrent-sweep-start]
[CMS-concurrent-sweep: 0.000/0.000 secs] [Times: user=0.00 sys=0.00, real=0.00 secs] 
[CMS-concurrent-reset-start]
[CMS-concurrent-reset: 0.000/0.000 secs] [Times: user=0.00 sys=0.00, real=0.00 secs] 
[GC (Allocation Failure) [ParNew: 1024K->1024K(1152K), 0.0000193 secs][CMS: 699K->767K(768K), 0.0054806 secs] 1723K->1103K(1920K), [Metaspace: 3837K->3837K(1056768K)], 0.0055873 secs] [Times: user=0.01 sys=0.00, real=0.01 secs] 
[GC (CMS Initial Mark) [1 CMS-initial-mark: 767K(768K)] 1120K(1920K), 0.0005313 secs] [Times: user=0.00 sys=0.00, real=0.00 secs] 
[CMS-concurrent-mark-start]
[CMS-concurrent-sweep-start]
[CMS-concurrent-sweep: 0.000/0.000 secs] [Times: user=0.00 sys=0.00, real=0.00 secs] 
[CMS-concurrent-reset-start]
[CMS-concurrent-reset: 0.000/0.000 secs] [Times: user=0.00 sys=0.00, real=0.00 secs] 
[GC (Allocation Failure) [ParNew: 1151K->1151K(1152K), 0.0000173 secs][CMS: 767K->767K(768K), 0.0064258 secs] 1919K->1911K(1920K), [Metaspace: 3833K->3833K(1056768K)], 0.0065034 secs] [Times: user=0.01 sys=0.00, real=0.01 secs] 
[Full GC (Allocation Failure) [CMS: 767K->767K(768K), 0.0054601 secs] 1919K->1919K(1920K), [Metaspace: 3833K->3833K(1056768K)], 0.0055053 secs] [Times: user=0.00 sys=0.00, real=0.01 secs] 
[Full GC (Allocation Failure) [CMS: 767K->767K(768K), 0.0053724 secs] 1919K->1919K(1920K), [Metaspace: 3833K->3833K(1056768K)], 0.0054066 secs] [Times: user=0.01 sys=0.00, real=0.00 secs] 
[Full GC (Allocation Failure) [CMS: 767K->767K(768K), 0.0055806 secs] 1919K->1919K(1920K), [Metaspace: 3833K->3833K(1056768K)], 0.0056121 secs] [Times: user=0.00 sys=0.00, real=0.01 secs] 
[Full GC (Allocation Failure) [CMS: 767K->767K(768K), 0.0059713 secs] 1919K->1910K(1920K), [Metaspace: 3833K->3833K(1056768K)], 0.0060044 secs] [Times: user=0.01 sys=0.00, real=0.00 secs] 
Exception in thread "main" java.lang.OutOfMemoryError: Java heap space
        at java.util.concurrent.ScheduledThreadPoolExecutor.scheduleWithFixedDelay(ScheduledThreadPoolExecutor.java:590)
        at com.sewell.GC_TEST.lambda$modelFit$1(GC_TEST.java:41)
        at com.sewell.GC_TEST$$Lambda$1/1418481495.accept(Unknown Source)
        at java.util.ArrayList.forEach(ArrayList.java:1257)
[Full GC (Allocation Failure) [CMS: 767K->767K(768K), 0.0061667 secs] 1919K->1912K(1920K), [Metaspace: 3858K->3858K(1056768K)], 0.0062021 secs] [Times: user=0.01 sys=0.00, real=0.00 secs] 
        at com.sewell.GC_TEST.modelFit(GC_TEST.java:39)
        at com.sewell.GC_TEST.main(GC_TEST.java:32)
[GC (CMS Initial Mark) [1 CMS-initial-mark: 767K(768K)] 1915K(1920K), 0.0011381 secs] [Times: user=0.00 sys=0.00, real=0.00 secs] 
[CMS-concurrent-mark-start]
[CMS-concurrent-mark: 0.001/0.001 secs] [Times: user=0.00 sys=0.00, real=0.00 secs] 
[CMS-concurrent-preclean-start]
[CMS-concurrent-preclean: 0.001/0.001 secs] [Times: user=0.00 sys=0.00, real=0.01 secs] 
[GC (CMS Final Remark) [YG occupancy: 1147 K (1152 K)][Rescan (parallel) , 0.0010098 secs][weak refs processing, 0.0000081 secs][class unloading, 0.0004277 secs][scrub symbol table, 0.0003610 secs][scrub string table, 0.0001915 secs][1 CMS-remark: 767K(768K)] 1915K(1920K), 0.0020317 secs] [Times: user=0.00 sys=0.00, real=0.00 secs] 
[CMS-concurrent-sweep-start]
[CMS-concurrent-sweep-start]
[CMS-concurrent-sweep: 0.000/0.000 secs] [Times: user=0.00 sys=0.00, real=0.00 secs] 
[CMS-concurrent-reset-start]
[CMS-concurrent-reset: 0.000/0.000 secs] [Times: user=0.00 sys=0.00, real=0.00 secs] 
^CHeap
 par new generation   total 1152K, used 1148K [0x00000000ffe00000, 0x00000000fff40000, 0x00000000fff40000)
  eden space 1024K, 100% used [0x00000000ffe00000, 0x00000000fff00000, 0x00000000fff00000)
  from space 128K,  97% used [0x00000000fff00000, 0x00000000fff1f338, 0x00000000fff20000)
  to   space 128K,   0% used [0x00000000fff20000, 0x00000000fff20000, 0x00000000fff40000)
 concurrent mark-sweep generation total 768K, used 767K [0x00000000fff40000, 0x0000000100000000, 0x0000000100000000)
 Metaspace       used 3866K, capacity 4644K, committed 4864K, reserved 1056768K
  class space    used 421K, capacity 455K, committed 512K, reserved 1048576K

G1

printgc

java -Xms1M -Xmx1M -XX:+PrintGC -XX:+UseG1GC com/sewell/Gc_Test_Application

[GC pause (G1 Evacuation Pause) (young) 1024K->472K(2048K), 0.0017137 secs]
[GC pause (G1 Evacuation Pause) (young)-- 1496K->1496K(2048K), 0.0056456 secs]
[GC pause (G1 Evacuation Pause) (young) (initial-mark) 1496K->1496K(2048K), 0.0004402 secs]
[GC concurrent-root-region-scan-start]
[GC concurrent-root-region-scan-end, 0.0000073 secs]
[GC concurrent-mark-start]
[GC concurrent-mark-end, 0.0009781 secs]
[Full GC (Allocation Failure)  1496K->468K(2048K), 0.0031411 secs]
[GC remark, 0.0000107 secs]
[GC concurrent-mark-abort]
[GC pause (G1 Evacuation Pause) (young)-- 1492K->1492K(2048K), 0.0080605 secs]
[GC pause (G1 Evacuation Pause) (young) (initial-mark) 1492K->1492K(2048K), 0.0009695 secs]
[GC concurrent-root-region-scan-start]
[GC concurrent-root-region-scan-end, 0.0000056 secs]
[GC concurrent-mark-start]
[GC concurrent-mark-end, 0.0027409 secs]
[Full GC (Allocation Failure)  1492K->1208K(2048K), 0.0059159 secs]
[Full GC (Allocation Failure)  1208K->1208K(2048K), 0.0052874 secs]
[GC pause (G1 Evacuation Pause) (young) 1208K->1208K(2048K), 0.0004920 secs]
[GC pause (G1 Evacuation Pause) (young) 1208K->1208K(2048K), 0.0003478 secs]
[Full GC (Allocation Failure)  1208K->1204K(2048K), 0.0054273 secs]
[Full GC (Allocation Failure)  1204K->1204K(2048K), 0.0047915 secs]

Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread "main"
[GC pause (G1 Evacuation Pause) (young) 1204K->1204K(2048K), 0.0003903 secs]
[GC pause (G1 Evacuation Pause) (young) 1204K->1204K(2048K), 0.0003914 secs]
[Full GC (Allocation Failure)  1204K->1202K(2048K), 0.0055455 secs]
[Full GC (Allocation Failure)  1202K->1202K(2048K), 0.0049705 secs]

printgcdetail

java -Xms1M -Xmx1M -XX:+PrintGCDetails -XX:+UseG1GC com/sewell/Gc_Test_Application

[GC pause (G1 Evacuation Pause) (young), 0.0017987 secs]
#young 年轻代 Evacuation:复制存活对象
   [Parallel Time: 1.7 ms, GC Workers: 1] # 1个gc线程
      [GC Worker Start (ms):  107.4]
      [Ext Root Scanning (ms):  0.8]
      [Update RS (ms):  0.0]
         [Processed Buffers:  0]
      [Scan RS (ms):  0.0]
      [Code Root Scanning (ms):  0.0]
      [Object Copy (ms):  0.7]
      [Termination (ms):  0.0]
         [Termination Attempts:  1]
      [GC Worker Other (ms):  0.0]
      [GC Worker Total (ms):  1.6]
      [GC Worker End (ms):  109.0]
   [Code Root Fixup: 0.0 ms]
   [Code Root Purge: 0.0 ms]
   [Clear CT: 0.0 ms]
   [Other: 0.1 ms]
      [Choose CSet: 0.0 ms]
      [Ref Proc: 0.0 ms]
      [Ref Enq: 0.0 ms]
      [Redirty Cards: 0.0 ms]
      [Humongous Register: 0.0 ms]
      [Humongous Reclaim: 0.0 ms]
      [Free CSet: 0.0 ms]
   [Eden: 1024.0K(1024.0K)->0.0B(1024.0K) Survivors: 0.0B->1024.0K Heap: 1024.0K(2048.0K)->472.0K(2048.0K)]
 [Times: user=0.00 sys=0.00, real=0.00 secs] 
[GC pause (G1 Evacuation Pause) (young) (to-space exhausted), 0.0059097 secs]
#空间耗尽
   [Parallel Time: 4.1 ms, GC Workers: 1]
      [GC Worker Start (ms):  191.3]
      [Ext Root Scanning (ms):  3.9]
      [Update RS (ms):  0.0]
         [Processed Buffers:  0]
      [Scan RS (ms):  0.0]
      [Code Root Scanning (ms):  0.0]
      [Object Copy (ms):  0.1]
      [Termination (ms):  0.0]
         [Termination Attempts:  1]
      [GC Worker Other (ms):  0.0]
      [GC Worker Total (ms):  4.1]
      [GC Worker End (ms):  195.4]
   [Code Root Fixup: 0.0 ms]
   [Code Root Purge: 0.0 ms]
   [Clear CT: 0.0 ms]
   [Other: 1.8 ms]
      [Evacuation Failure: 1.7 ms]
      [Choose CSet: 0.0 ms]
      [Ref Proc: 0.0 ms]
      [Ref Enq: 0.0 ms]
      [Redirty Cards: 0.0 ms]
      [Humongous Register: 0.0 ms]
      [Humongous Reclaim: 0.0 ms]
      [Free CSet: 0.0 ms]
   [Eden: 1024.0K(1024.0K)->0.0B(1024.0K) Survivors: 1024.0K->0.0B Heap: 1496.0K(2048.0K)->1496.0K(2048.0K)]
 [Times: user=0.00 sys=0.00, real=0.01 secs] 
[GC pause (G1 Evacuation Pause) (young) (initial-mark), 0.0010155 secs]
#young -> 年轻代 Evacuation-> 复制存活对象 
#initial-mark 混合回收的阶段,这里是YGC混合老年代回收
 [Parallel Time: 1.0 ms, GC Workers: 1]
      [GC Worker Start (ms):  197.6]
      [Ext Root Scanning (ms):  0.3]
      [Update RS (ms):  0.6]
         [Processed Buffers:  5]
      [Scan RS (ms):  0.0]
      [Code Root Scanning (ms):  0.0]
      [Object Copy (ms):  0.0]
      [Termination (ms):  0.0]
         [Termination Attempts:  1]
      [GC Worker Other (ms):  0.0]
      [GC Worker Total (ms):  0.9]
      [GC Worker End (ms):  198.6]
   [Code Root Fixup: 0.0 ms]
   [Code Root Purge: 0.0 ms]
   [Clear CT: 0.0 ms]
   [Other: 0.0 ms]
      [Choose CSet: 0.0 ms]
      [Ref Proc: 0.0 ms]
      [Ref Enq: 0.0 ms]
      [Redirty Cards: 0.0 ms]
      [Humongous Register: 0.0 ms]
      [Humongous Reclaim: 0.0 ms]
      [Free CSet: 0.0 ms]
   [Eden: 0.0B(1024.0K)->0.0B(1024.0K) Survivors: 0.0B->0.0B Heap: 1496.0K(2048.0K)->1496.0K(2048.0K)]
 [Times: user=0.00 sys=0.00, real=0.00 secs] 
 #mix gc 回收阶段
[GC concurrent-root-region-scan-start]
[GC concurrent-root-region-scan-end, 0.0000077 secs]
[GC concurrent-mark-start]
[GC concurrent-mark-end, 0.0011259 secs]
#无法evacuation 进行了Full GC
[Full GC (Allocation Failure)  1496K->468K(2048K), 0.0034597 secs]
   [Eden: 0.0B(1024.0K)->0.0B(1024.0K) Survivors: 0.0B->0.0B Heap: 1496.0K(2048.0K)->468.5K(2048.0K)], [Metaspace: 3767K->3760K(1056768K)]
 [Times: user=0.00 sys=0.00, real=0.00 secs] 
[GC remark, 0.0000159 secs]
 [Times: user=0.00 sys=0.00, real=0.00 secs] 
[GC concurrent-mark-abort]
[GC pause (G1 Evacuation Pause) (young) (to-space exhausted), 0.0077862 secs]
   [Parallel Time: 6.5 ms, GC Workers: 1]
      [GC Worker Start (ms):  3727.8]
      [Ext Root Scanning (ms):  0.4]
      [Update RS (ms):  0.0]
         [Processed Buffers:  18]
      [Scan RS (ms):  0.0]
      [Code Root Scanning (ms):  0.0]
      [Object Copy (ms):  5.9]
      [Termination (ms):  0.0]
         [Termination Attempts:  1]
      [GC Worker Other (ms):  0.0]
      [GC Worker Total (ms):  6.4]
      [GC Worker End (ms):  3734.1]
   [Code Root Fixup: 0.0 ms]
   [Code Root Purge: 0.0 ms]
   [Clear CT: 0.0 ms]
   [Other: 1.3 ms]
      [Evacuation Failure: 1.2 ms]
      [Choose CSet: 0.0 ms]
      [Ref Proc: 0.0 ms]
      [Ref Enq: 0.0 ms]
      [Redirty Cards: 0.0 ms]
      [Humongous Register: 0.0 ms]
      [Humongous Reclaim: 0.0 ms]
      [Free CSet: 0.0 ms]
   [Eden: 1024.0K(1024.0K)->0.0B(1024.0K) Survivors: 0.0B->0.0B Heap: 1492.5K(2048.0K)->1492.5K(2048.0K)]
 [Times: user=0.01 sys=0.00, real=0.01 secs] 
[GC pause (G1 Evacuation Pause) (young) (initial-mark), 0.0010648 secs]
   [Parallel Time: 1.0 ms, GC Workers: 1]
      [GC Worker Start (ms):  3736.6]
      [Ext Root Scanning (ms):  0.4]
      [Update RS (ms):  0.5]
         [Processed Buffers:  4]
      [Scan RS (ms):  0.0]
      [Code Root Scanning (ms):  0.0]
      [Object Copy (ms):  0.0]
      [Termination (ms):  0.0]
         [Termination Attempts:  1]
      [GC Worker Other (ms):  0.0]
      [GC Worker Total (ms):  0.9]
      [GC Worker End (ms):  3737.5]
   [Code Root Fixup: 0.0 ms]
   [Code Root Purge: 0.0 ms]
   [Clear CT: 0.0 ms]
   [Other: 0.1 ms]
      [Choose CSet: 0.0 ms]
      [Ref Proc: 0.0 ms]
      [Ref Enq: 0.0 ms]
      [Redirty Cards: 0.0 ms]
      [Humongous Register: 0.0 ms]
      [Humongous Reclaim: 0.0 ms]
      [Free CSet: 0.0 ms]
   [Eden: 0.0B(1024.0K)->0.0B(1024.0K) Survivors: 0.0B->0.0B Heap: 1492.5K(2048.0K)->1492.5K(2048.0K)]
 [Times: user=0.00 sys=0.00, real=0.00 secs] 
[GC concurrent-root-region-scan-start]
[GC concurrent-root-region-scan-end, 0.0000050 secs]
[GC concurrent-mark-start]
[GC concurrent-mark-end, 0.0026229 secs]
[Full GC (Allocation Failure)  1492K->1208K(2048K), 0.0058381 secs]
   [Eden: 0.0B(1024.0K)->0.0B(1024.0K) Survivors: 0.0B->0.0B Heap: 1492.5K(2048.0K)->1208.7K(2048.0K)], [Metaspace: 3839K->3839K(1056768K)]
 [Times: user=0.01 sys=0.00, real=0.01 secs] 
[Full GC (Allocation Failure)  1208K->1208K(2048K), 0.0052693 secs]
   [Eden: 0.0B(1024.0K)->0.0B(1024.0K) Survivors: 0.0B->0.0B Heap: 1208.7K(2048.0K)->1208.7K(2048.0K)], [Metaspace: 3839K->3839K(1056768K)]
 [Times: user=0.00 sys=0.00, real=0.00 secs] 
[GC pause (G1 Evacuation Pause) (young), 0.0004201 secs]
   [Parallel Time: 0.4 ms, GC Workers: 1]
      [GC Worker Start (ms):  3751.9]
      [Ext Root Scanning (ms):  0.3]
      [Update RS (ms):  0.0]
         [Processed Buffers:  1]
      [Scan RS (ms):  0.0]
      [Code Root Scanning (ms):  0.0]
      [Object Copy (ms):  0.0]
      [Termination (ms):  0.0]
         [Termination Attempts:  1]
      [GC Worker Other (ms):  0.0]
      [GC Worker Total (ms):  0.3]
      [GC Worker End (ms):  3752.2]
   [Code Root Fixup: 0.0 ms]
   [Code Root Purge: 0.0 ms]
   [Clear CT: 0.0 ms]
   [Other: 0.0 ms]
      [Choose CSet: 0.0 ms]
      [Ref Proc: 0.0 ms]
      [Ref Enq: 0.0 ms]
      [Redirty Cards: 0.0 ms]
      [Humongous Register: 0.0 ms]
      [Humongous Reclaim: 0.0 ms]
      [Free CSet: 0.0 ms]
   [Eden: 0.0B(1024.0K)->0.0B(1024.0K) Survivors: 0.0B->0.0B Heap: 1208.7K(2048.0K)->1208.7K(2048.0K)]
 [Times: user=0.00 sys=0.00, real=0.00 secs] 
[GC pause (G1 Evacuation Pause) (young), 0.0003411 secs]
   [Parallel Time: 0.3 ms, GC Workers: 1]
      [GC Worker Start (ms):  3752.5]
      [Ext Root Scanning (ms):  0.2]
      [Update RS (ms):  0.0]
         [Processed Buffers:  1]
      [Scan RS (ms):  0.0]
      [Code Root Scanning (ms):  0.0]
      [Object Copy (ms):  0.0]
      [Termination (ms):  0.0]
         [Termination Attempts:  1]
      [GC Worker Other (ms):  0.0]
      [GC Worker Total (ms):  0.3]
      [GC Worker End (ms):  3752.8]
   [Code Root Fixup: 0.0 ms]
   [Code Root Purge: 0.0 ms]
   [Clear CT: 0.0 ms]
   [Other: 0.0 ms]
      [Choose CSet: 0.0 ms]
      [Ref Proc: 0.0 ms]
      [Ref Enq: 0.0 ms]
      [Redirty Cards: 0.0 ms]
      [Humongous Register: 0.0 ms]
      [Humongous Reclaim: 0.0 ms]
      [Free CSet: 0.0 ms]
   [Eden: 0.0B(1024.0K)->0.0B(1024.0K) Survivors: 0.0B->0.0B Heap: 1208.7K(2048.0K)->1208.7K(2048.0K)]
 [Times: user=0.00 sys=0.00, real=0.00 secs] 
[Full GC (Allocation Failure)  1208K->1204K(2048K), 0.0051790 secs]
   [Eden: 0.0B(1024.0K)->0.0B(1024.0K) Survivors: 0.0B->0.0B Heap: 1208.7K(2048.0K)->1204.3K(2048.0K)], [Metaspace: 3839K->3839K(1056768K)]
 [Times: user=0.01 sys=0.00, real=0.01 secs] 
[Full GC (Allocation Failure)  1204K->1204K(2048K), 0.0049418 secs]
   [Eden: 0.0B(1024.0K)->0.0B(1024.0K) Survivors: 0.0B->0.0B Heap: 1204.3K(2048.0K)->1204.3K(2048.0K)], [Metaspace: 3839K->3839K(1056768K)]
 [Times: user=0.00 sys=0.00, real=0.00 secs] 

Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread "main"
[GC pause (G1 Evacuation Pause) (young), 0.0004117 secs]
   [Parallel Time: 0.4 ms, GC Workers: 1]
      [GC Worker Start (ms):  3763.5]
      [Ext Root Scanning (ms):  0.3]
      [Update RS (ms):  0.0]
         [Processed Buffers:  1]
      [Scan RS (ms):  0.0]
      [Code Root Scanning (ms):  0.0]
      [Object Copy (ms):  0.0]
      [Termination (ms):  0.0]
         [Termination Attempts:  1]
      [GC Worker Other (ms):  0.0]
      [GC Worker Total (ms):  0.3]
      [GC Worker End (ms):  3763.9]
   [Code Root Fixup: 0.0 ms]
   [Code Root Purge: 0.0 ms]
   [Clear CT: 0.0 ms]
   [Other: 0.1 ms]
      [Choose CSet: 0.0 ms]
      [Ref Proc: 0.0 ms]
      [Ref Enq: 0.0 ms]
      [Redirty Cards: 0.0 ms]
      [Humongous Register: 0.0 ms]
      [Humongous Reclaim: 0.0 ms]
      [Free CSet: 0.0 ms]
   [Eden: 0.0B(1024.0K)->0.0B(1024.0K) Survivors: 0.0B->0.0B Heap: 1204.3K(2048.0K)->1204.3K(2048.0K)]
 [Times: user=0.01 sys=0.00, real=0.00 secs] 
[GC pause (G1 Evacuation Pause) (young), 0.0003507 secs]
   [Parallel Time: 0.3 ms, GC Workers: 1]
      [GC Worker Start (ms):  3764.2]
      [Ext Root Scanning (ms):  0.3]
      [Update RS (ms):  0.0]
         [Processed Buffers:  1]
      [Scan RS (ms):  0.0]
      [Code Root Scanning (ms):  0.0]
      [Object Copy (ms):  0.0]
      [Termination (ms):  0.0]
         [Termination Attempts:  1]
      [GC Worker Other (ms):  0.0]
      [GC Worker Total (ms):  0.3]
      [GC Worker End (ms):  3764.4]
   [Code Root Fixup: 0.0 ms]
   [Code Root Purge: 0.0 ms]
   [Clear CT: 0.0 ms]
   [Other: 0.0 ms]
      [Choose CSet: 0.0 ms]
      [Ref Proc: 0.0 ms]
      [Ref Enq: 0.0 ms]
      [Redirty Cards: 0.0 ms]
      [Humongous Register: 0.0 ms]
      [Humongous Reclaim: 0.0 ms]
      [Free CSet: 0.0 ms]
   [Eden: 0.0B(1024.0K)->0.0B(1024.0K) Survivors: 0.0B->0.0B Heap: 1204.3K(2048.0K)->1204.3K(2048.0K)]
 [Times: user=0.00 sys=0.00, real=0.01 secs] 
[Full GC (Allocation Failure)  1204K->1202K(2048K), 0.0050929 secs]
   [Eden: 0.0B(1024.0K)->0.0B(1024.0K) Survivors: 0.0B->0.0B Heap: 1204.3K(2048.0K)->1202.4K(2048.0K)], [Metaspace: 3839K->3839K(1056768K)]
 [Times: user=0.00 sys=0.00, real=0.00 secs] 
[Full GC (Allocation Failure)  1202K->1202K(2048K), 0.0046902 secs]
   [Eden: 0.0B(1024.0K)->0.0B(1024.0K) Survivors: 0.0B->0.0B Heap: 1202.4K(2048.0K)->1202.4K(2048.0K)], [Metaspace: 3839K->3839K(1056768K)]
 [Times: user=0.00 sys=0.00, real=0.01 secs] 

标签:0.0,0.00,sys,secs,GC,ms,格式,日志
来源: https://www.cnblogs.com/sewell/p/15471117.html