我正在使用-XX:+PrintGCApplicationStoppedTime
和-XX:+PrintGCApplicationConcurrentTime
选项来打开 gc 日志记录。
但是发现只有经过4 0r 5 打印了我通过命令PrintGCApplicationStoppedTime
打印的gc日志的实际细节!-XX:+PrintGCDetails
根据定义PrintGCApplicationStoppedTime
打印每个 gc 的应用程序停止时间。
但我不清楚为什么它会像下面显示的示例那样打印。
是不是因为
PrintGCApplicationStoppedTime
在每个安全点到达后打印
(或者)
日志文件将由不同的 gc 线程记录。我对全 GC 使用并发扫描,对年轻一代使用 ParNew
我的应用程序是网络应用程序。
O/p 模式——我是这样的:
Application time: 0.3847031 seconds
Total time for which application threads were stopped: 0.3135419 seconds
Application time: 0.1520723 seconds
Total time for which application threads were stopped: 0.1993920 seconds
Application time: 0.1188219 seconds
Total time for which application threads were stopped: 0.1993920 seconds
Application time: 0.1188219 seconds
Total time for which application threads were stopped: 0.1993920 seconds
Application time: 0.1188219 seconds
Total time for which application threads were stopped: 0.1993920 seconds
Application time: 0.1188219 seconds
1.229: [GC 1.229: [ParNew: 256000K->51200K(256000K), 0.1509756 secs] 426536K->334728K(997376K), 0.1510198 secs] [Times: user=0.85 sys=0.07, real=0.15 secs]