IBM JDK GC日志 2

主题

IBM JDK GC日志 2

IBM JDK GC日志

使用编辑器打开

使用顺手的编辑器,可以打开此文件。

<exclusive-start id="2" timestamp="2020-03-24T15:47:53.464" intervalms="1897.930">
<response-info timems="0.006" idlems="0.006" threads="0" lastid="000000000148F500" lastname="main" />
</exclusive-start>
<sys-start reason="explicit" id="3" timestamp="2020-03-24T15:47:53.464" intervalms="1897.991" />
<cycle-start id="4" type="global" contextid="0" timestamp="2020-03-24T15:47:53.464" intervalms="1898.018" />
<gc-start id="5" type="global" contextid="4" timestamp="2020-03-24T15:47:53.464">
<mem-info id="6" free="5432112952" total="6442450944" percent="84">
<mem type="nursery" free="605242840" total="1610612736" percent="37">
<mem type="allocate" free="605242840" total="805306368" percent="75" />
<mem type="survivor" free="0" total="805306368" percent="0" />
</mem>
<mem type="tenure" free="4826870112" total="4831838208" percent="99">
<mem type="soa" free="4585278816" total="4590246912" percent="99" />
<mem type="loa" free="241591296" total="241591296" percent="100" />
</mem>
<remembered-set count="54646" />
</mem-info>
</gc-start>
<allocation-stats totalBytes="204951568" >
<allocated-bytes non-tlh="7067848" tlh="197883720" />
<largest-consumer threadName="main" threadId="000000000148F500" bytes="173698128" />
</allocation-stats>
<gc-op id="7" type="mark" timems="34.924" contextid="4" timestamp="2020-03-24T15:47:53.499">
<trace-info objectcount="534243" scancount="427199" scanbytes="14139936" />
<finalization candidates="2107" enqueued="1401" />
<ownableSynchronizers candidates="523" cleared="284" />
<references type="soft" candidates="4645" cleared="0" enqueued="0" dynamicThreshold="32" maxThreshold="32" />
<references type="weak" candidates="24212" cleared="2956" enqueued="2847" />
<references type="phantom" candidates="6" cleared="0" enqueued="0" />
<stringconstants candidates="43438" cleared="1662" />
</gc-op>
<gc-op id="8" type="classunload" timems="0.007" contextid="4" timestamp="2020-03-24T15:47:53.499">
<classunload-info classloadercandidates="123" classloadersunloaded="0" classesunloaded="0" anonymousclassesunloaded="0" quiescems="0.319" setupms="0.007" scanms="0.000" postms="0.000" />
</gc-op>
<gc-op id="9" type="sweep" timems="4.921" contextid="4" timestamp="2020-03-24T15:47:53.504" />
<gc-end id="10" type="global" contextid="4" durationms="40.349" usertimems="132.466" systemtimems="163.547" timestamp="2020-03-24T15:47:53.504" activeThreads="8">
<mem-info id="11" free="5592597192" total="6442450944" percent="86">
<mem type="nursery" free="765718504" total="1610612736" percent="47">
<mem type="allocate" free="765718504" total="805306368" percent="95" />
<mem type="survivor" free="0" total="805306368" percent="0" />
</mem>
<mem type="tenure" free="4826878688" total="4831838208" percent="99">
<mem type="soa" free="4585287392" total="4590246912" percent="99" />
<mem type="loa" free="241591296" total="241591296" percent="100" />
</mem>
<pending-finalizers system="1395" default="6" reference="2847" classloader="0" />
<remembered-set count="51270" />
</mem-info>
</gc-end>
<cycle-end id="12" type="global" contextid="4" timestamp="2020-03-24T15:47:53.505" />
<sys-end id="13" timestamp="2020-03-24T15:47:53.505" />
<exclusive-end id="14" timestamp="2020-03-24T15:47:53.505" durationms="41.343" />

这一段,说明了很多东西

  • exclusive-start

    表明这是一次独占式的GC

  • sys-start

    表明这是系统发起的,一般来说,这是调用了System.gc()

  • cycle-start

    标记GC开始,一个新的周期,这里的global表明这是一次Full GC

  • gc-start

    记录GC开始前的内存使用情况

  • allocation-stats

    记录当前分配情况,largest-consumer表明了目前内存最大的消耗者,这里是main

  • gc-op

    第一个GC动作,mark,标记

  • gc-op

    第二个GC动作,classunload,卸载类

  • gc-op

    第三个GC动作,sweep,扫描

  • gc-end

    GC结束,记录GC结束后的内存情况

  • cycle-end

    周期结束

  • exclusive-end

    独占释放

建议

格式相对来说比较简单,可读性较强,建议自己分析一遍。