gpt4 book ai didi

java - GC时间戳 未打印

转载 作者:行者123 更新时间:2023-12-01 11:59:11 25 4
gpt4 key购买 nike

我使用以下配置运行java应用程序

-Xmx512M
-Xms32M
-XX:+PrintGCApplicationStoppedTime
-XX:+PrintGCDetails
-XX:+PrintGCDateStamps
-Xloggc:Desktop/Gen/Gen/gc.log
-XX:+PrintGCTimeStamps
-XX:+PrintGCApplicationConcurrentTime
-XX:+PrintGC

但它没有在 gc.log 文件中打印 GCTimeStamps..

gc.log 文件内容如下所示..

Application time: 0.0272860 seconds

2015-01-23T17:18:14.054+0100: 0.731: [GC [PSYoungGen: 94627K->58213K(108928K)] 226219K->217525K(287744K), 0.0607860 secs] [Times: user=0.35 sys=0.12, real=0.06 secs]
2015-01-23T17:18:14.115+0100: 0.792: [Full GC [PSYoungGen: 58213K->38649K(108928K)] [PSOldGen: 159312K->178815K(251904K)] 217525K->217465K(360832K) [PSPermGen: 4237K->4237K(21248K)], 0.1840190 secs] [Times: user=0.18 sys=0.01, real=0.19 secs]

Total time for which application threads were stopped: 0.2449170 seconds

Application time: 0.0107920 seconds

最佳答案

来自您的日志

Application time: 0.0272860 seconds

上面的行由-XX:+PrintGCApplicationConcurrentTime生成,没有日期戳

2015-01-23T17:18:14.054+0100: 0.731: [GC [PSYoungGen: 94627K->58213K(108928K)] 226219K->217525K(287744K), 0.0607860 secs] [Times: user=0.35 sys=0.12, real=0.06 secs]
2015-01-23T17:18:14.115+0100: 0.792: [Full GC [PSYoungGen: 58213K->38649K(108928K)] [PSOldGen: 159312K->178815K(251904K)] 217525K->217465K(360832K) [PSPermGen: 4237K->4237K(21248K)], 0.1840190 secs] [Times: user=0.18 sys=0.01, real=0.19 secs]

上面的行是由-XX:+PrintGCDetails生成的,日期戳是它们

Total time for which application threads were stopped: 0.2449170 seconds

上面的行由-XX:+PrintGCApplicationStopedTime生成,没有日期戳

Application time: 0.0107920 seconds

上面的行由-XX:+PrintGCApplicationConcurrentTime生成,没有日期戳

总结

-XX:+PrintGCDateStamps 仅适用于 -XX:+PrintGCDetails

生成的输出

不幸的是,输出-XX:+PrintGCApplicationConcurrentTime-XX:+PrintGCApplicationStoppedTime无法添加日期戳前缀

您可以找到有关 GC 诊断选项的更多详细信息 here .

关于java - GC时间戳 未打印,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28114195/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com