了解GC日志 - 已停止应用程序线程

时间:2015-08-20 14:10:16

标签: java multithreading garbage-collection garbage

看看GC日志文件,其不言自明,了解应用已停止0.0011450秒(停止世界)

Total time for which application threads were stopped: 0.0011450 seconds

但是,请帮助我理解下面的线条是否也意味着世界末日?或者它只显示每个线程所用的时间,real = TIME意味着什么(下面的最后一行)?

Finished work stealing in 3th thread: 13.706 sec
Finished work stealing in 2th thread: 17.325 sec
Finished work stealing in 4th thread: 17.052 sec
Finished work stealing in 0th thread: 17.325 sec
Finished work stealing in 1th thread: 17.324 sec
2015-08-19T03:20:32.882-0400: 321985.669: [CMS-concurrent-mark: 20.519/20.624 secs] (CMS-concurrent-mark yielded 6 times)
 [Times: user=138.91 sys=0.10, real=20.62 secs] 

1 个答案:

答案 0 :(得分:0)

This oracle blog post是Google搜索" CMS-concurrent-mark"的第一个结果。并解释了各种CMS阶段。

通过GCviewer运行日志也会分别列出STW和非STW阶段。

既然你已经开启了应用程序停止时间记录,那么缺少停止时间记录条目应该是一个死的赠品,无论它是否是STW暂停。

  

real = TIME意味着什么(下面的最后一行)?

此输出相当于您从time获得的输出。另请参阅this SO answer。或this one专门指CMS日志。