• <legend id='o5CHC'><style id='o5CHC'><dir id='o5CHC'><q id='o5CHC'></q></dir></style></legend>

      <bdo id='o5CHC'></bdo><ul id='o5CHC'></ul>
    <i id='o5CHC'><tr id='o5CHC'><dt id='o5CHC'><q id='o5CHC'><span id='o5CHC'><b id='o5CHC'><form id='o5CHC'><ins id='o5CHC'></ins><ul id='o5CHC'></ul><sub id='o5CHC'></sub></form><legend id='o5CHC'></legend><bdo id='o5CHC'><pre id='o5CHC'><center id='o5CHC'></center></pre></bdo></b><th id='o5CHC'></th></span></q></dt></tr></i><div id='o5CHC'><tfoot id='o5CHC'></tfoot><dl id='o5CHC'><fieldset id='o5CHC'></fieldset></dl></div>
    <tfoot id='o5CHC'></tfoot>

      <small id='o5CHC'></small><noframes id='o5CHC'>

      1. 分析 gc 日志

        Analyzing gc logs(分析 gc 日志)
        <tfoot id='v3Qvp'></tfoot>
            <tbody id='v3Qvp'></tbody>

          <legend id='v3Qvp'><style id='v3Qvp'><dir id='v3Qvp'><q id='v3Qvp'></q></dir></style></legend>

          1. <i id='v3Qvp'><tr id='v3Qvp'><dt id='v3Qvp'><q id='v3Qvp'><span id='v3Qvp'><b id='v3Qvp'><form id='v3Qvp'><ins id='v3Qvp'></ins><ul id='v3Qvp'></ul><sub id='v3Qvp'></sub></form><legend id='v3Qvp'></legend><bdo id='v3Qvp'><pre id='v3Qvp'><center id='v3Qvp'></center></pre></bdo></b><th id='v3Qvp'></th></span></q></dt></tr></i><div id='v3Qvp'><tfoot id='v3Qvp'></tfoot><dl id='v3Qvp'><fieldset id='v3Qvp'></fieldset></dl></div>
          2. <small id='v3Qvp'></small><noframes id='v3Qvp'>

                  <bdo id='v3Qvp'></bdo><ul id='v3Qvp'></ul>
                  本文介绍了分析 gc 日志的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我正在使用 -XX:+PrintGCApplicationStoppedTime-XX:+PrintGCApplicationConcurrentTime 选项来开启 gc 日志记录.

                  I am using -XX:+PrintGCApplicationStoppedTime and -XX:+PrintGCApplicationConcurrentTime options to turn on gc logging.

                  但发现只有在 PrintGCApplicationStoppedTime 4 0r 5 次打印后,我通过 -XX:+PrintGCDetails 命令打印的 gc 日志的实际详细信息!

                  But found that only after 4 0r 5 prints of PrintGCApplicationStoppedTime my actual details of gc logs printed through -XX:+PrintGCDetails command!

                  根据定义 PrintGCApplicationStoppedTime 打印每次 gc 的应用程序停止时间.

                  By definition PrintGCApplicationStoppedTime prints application stopped time for every gc.

                  但我不清楚为什么它会像下面显示的示例那样打印.

                  But I am not clear why it prints like the example shown below.

                  是因为

                  PrintGCApplicationStoppedTime 仅在到达每个安全点后打印

                  PrintGCApplicationStoppedTime just prints after every safe point reach

                  (或)

                  日志文件将由不同的 gc 线程记录.我对全 GC 使用并发扫描,对年轻一代使用 ParNew

                  the log file will be logged by different gc threads. Im using Concurrent sweep for full GC and ParNew for the young generation

                  我的应用是网络应用.

                  O/p 模式——我是这样的:

                  O/p Pattern- Im getting like this:

                  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]
                  

                  推荐答案

                  不幸的是,PrintGCApplicationStoppedTime 是这个 JVM 选项的误导性名称.

                  Unfortunately PrintGCApplicationStoppedTime is misleading name for this JVM option.

                  事实上,它会打印在安全点内花费的时间.安全点暂停不仅是由于垃圾收集,还有许多其他原因:

                  In fact it prints the time spent inside safepoints. Safepoint pauses occur not only due to Garbage Collection, but for many other reasons:

                  • 去优化
                  • 有偏锁撤销
                  • 线程转储
                  • 堆检查
                  • 类重定义
                  • 等等.(参见列表)

                  即使没有请求 VM 操作,安全点也可能会定期发生,以便为空闲监视器放气、执行某些 JIT 清理等.请参阅 -XX:GuaranteedSafepointInterval VM 选项(默认为 1000 毫秒).

                  Safepoints may happen periodically even without a requested VM operation in order to deflate idle monitors, perform certain JIT cleanup and so on. See -XX:GuaranteedSafepointInterval VM option (1000 milliseconds by default).

                  使用 -XX:+PrintSafepointStatistics -XX:PrintSafepointStatisticsCount=1 转储有关安全点的更多信息.

                  Use -XX:+PrintSafepointStatistics -XX:PrintSafepointStatisticsCount=1 to dump more information about safepoints.

                  这篇关于分析 gc 日志的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                  相关文档推荐

                  Bytecode features not available in the Java language(Java 语言中不可用的字节码功能)
                  ClassCastException because of classloaders?(ClassCastException 因为类加载器?)
                  How can I add a Javaagent to a JVM without stopping the JVM?(如何在不停止 JVM 的情况下将 Javaagent 添加到 JVM?)
                  Cannot load 64-bit SWT libraries on 32-bit JVM ( replacing SWT file )(无法在 32 位 JVM 上加载 64 位 SWT 库(替换 SWT 文件))
                  Encourage the JVM to GC rather than grow the heap?(鼓励 JVM 进行 GC 而不是增加堆?)
                  Why a sawtooth shaped graph?(为什么是锯齿形图形?)

                    <i id='8E3v7'><tr id='8E3v7'><dt id='8E3v7'><q id='8E3v7'><span id='8E3v7'><b id='8E3v7'><form id='8E3v7'><ins id='8E3v7'></ins><ul id='8E3v7'></ul><sub id='8E3v7'></sub></form><legend id='8E3v7'></legend><bdo id='8E3v7'><pre id='8E3v7'><center id='8E3v7'></center></pre></bdo></b><th id='8E3v7'></th></span></q></dt></tr></i><div id='8E3v7'><tfoot id='8E3v7'></tfoot><dl id='8E3v7'><fieldset id='8E3v7'></fieldset></dl></div>
                  • <small id='8E3v7'></small><noframes id='8E3v7'>

                          <tbody id='8E3v7'></tbody>
                        • <bdo id='8E3v7'></bdo><ul id='8E3v7'></ul>
                          <legend id='8E3v7'><style id='8E3v7'><dir id='8E3v7'><q id='8E3v7'></q></dir></style></legend><tfoot id='8E3v7'></tfoot>