<html><head><style>body{font-family:Helvetica,Arial;font-size:13px}</style></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;"><div id="bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px; color: rgba(0,0,0,1.0); margin: 0px; line-height: auto;"><div id="bloop_customfont" style="margin: 0px;">Hi all,</div><div id="bloop_customfont" style="margin: 0px;"><br></div><div id="bloop_customfont" style="margin: 0px;">Has anyone noticed that in JDK 9 the age table in G1 is printed before the GC actually happens? This means that the age table information associated with each GC corresponds to the previous GC. Example:</div><div id="bloop_customfont" style="margin: 0px;"><br></div><div id="bloop_customfont" style="margin: 0px;"><p style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;"><span style="font-variant-ligatures: no-common-ligatures;">[2.382s][info][gc,start ] GC(0) Pause Young (G1 Evacuation Pause) (2.382s)</span></p><p style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;"><span style="font-variant-ligatures: no-common-ligatures;">[2.382s][info][gc,task ] GC(0) GC Workers: using 18 out of 18</span></p><p style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;"><span style="font-variant-ligatures: no-common-ligatures;">[2.382s][debug][gc,age ] GC(0) Desired survivor size 895483904 bytes, new threshold 6 (max threshold 6)</span></p><p style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;"><span style="font-variant-ligatures: no-common-ligatures;">## No objects copied to the survivors?</span></p><p style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;"><span style="font-variant-ligatures: no-common-ligatures;">[2.383s][info ][gc,task ] GC(0) GC Workers: using 18 out of 18</span></p><p style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;"><span style="font-variant-ligatures: no-common-ligatures;">[2.415s][info ][gc,task ] GC(0) GC Workers: using 18 out of 18</span></p><p style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;"><span style="font-variant-ligatures: no-common-ligatures;">[2.415s][info ][gc,task ] GC(0) GC Workers: using 18 out of 18</span></p><p style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;"><span style="font-variant-ligatures: no-common-ligatures;">[2.416s][info ][gc,task ] GC(0) GC Workers: using 18 out of 18</span></p><p style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;"><span style="font-variant-ligatures: no-common-ligatures;">[2.417s][info ][gc,task ] GC(0) GC Workers: using 18 out of 18</span></p><p style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;"><span style="font-variant-ligatures: no-common-ligatures;">[2.417s][info ][gc,task ] GC(0) GC Workers: using 18 out of 18</span></p><p style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;"><span style="font-variant-ligatures: no-common-ligatures;">[2.417s][info ][gc,task ] GC(0) GC Workers: using 18 out of 18</span></p><p style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;"><span style="font-variant-ligatures: no-common-ligatures;">[2.418s][info ][gc,task ] GC(0) GC Workers: using 18 out of 18</span></p><p style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;"><span style="font-variant-ligatures: no-common-ligatures;">[2.419s][info ][gc,phases ] GC(0) Evacuate Collection Set: 32.1ms</span></p><p style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;"><span style="font-variant-ligatures: no-common-ligatures;">[2.419s][info ][gc,phases ] GC(0) Code Roots: 0.0ms</span></p><p style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;"><span style="font-variant-ligatures: no-common-ligatures;">[2.419s][info ][gc,phases ] GC(0) Clear Card Table: 1.5ms</span></p><p style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;"><span style="font-variant-ligatures: no-common-ligatures;">[2.419s][info ][gc,phases ] GC(0) Expand Heap After Collection: 0.0ms</span></p><p style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;"><span style="font-variant-ligatures: no-common-ligatures;">[2.419s][info ][gc,phases ] GC(0) Free Collection Set: 2.0ms</span></p><p style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;"><span style="font-variant-ligatures: no-common-ligatures;">[2.419s][info ][gc,phases ] GC(0) Merge Per-Thread State: 0.1ms</span></p><p style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;"><span style="font-variant-ligatures: no-common-ligatures;">[2.419s][info ][gc,phases ] GC(0) Other: 1.6ms</span></p><p style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;"><span style="font-variant-ligatures: no-common-ligatures;">[2.419s][info ][gc,heap ] GC(0) Eden regions: 2560->0(2553)</span></p><p style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;"><span style="font-variant-ligatures: no-common-ligatures;">[2.419s][info ][gc,heap ] GC(0) Survivor regions: 0->7(427)</span></p><p style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;"><span style="font-variant-ligatures: no-common-ligatures;">## Yes, objects were copied to the survivors...</span></p><p style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;"><span style="font-variant-ligatures: no-common-ligatures;">[2.419s][info ][gc,heap ] GC(0) Old regions: 0->0</span></p><p style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;"><span style="font-variant-ligatures: no-common-ligatures;">[2.419s][info ][gc,heap ] GC(0) Humongous regions: 0->0</span></p><p style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;"><span style="font-variant-ligatures: no-common-ligatures;">[2.419s][info ][gc,metaspace ] GC(0) Metaspace: 6038K->6038K(1056768K)</span></p><p style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;"><span style="font-variant-ligatures: no-common-ligatures;">[2.419s][info ][gc ] GC(0) Pause Young (G1 Evacuation Pause) 10240M->26M(12288M) (2.382s, 2.419s) 37.309ms</span></p><p style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;"><span style="font-variant-ligatures: no-common-ligatures;">[2.419s][info ][gc,cpu ] GC(0) User=0.20s Sys=0.14s Real=0.03s</span></p><p style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;"><span style="font-variant-ligatures: no-common-ligatures;">[3.248s][info ][gc,start ] GC(1) Pause Young (G1 Evacuation Pause) (3.247s)</span></p><p style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;"><span style="font-variant-ligatures: no-common-ligatures;">[3.248s][info ][gc,task ] GC(1) GC Workers: using 18 out of 18</span></p><p style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;"><span style="font-variant-ligatures: no-common-ligatures;">[3.248s][debug][gc,age ] GC(1) Desired survivor size 895483904 bytes, new threshold 6 (max threshold 6)</span></p><p style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;"><span style="font-variant-ligatures: no-common-ligatures;">[3.248s][trace][gc,age ] GC(1) - age 1: 27243352 bytes, 27243352 total</span></p><p style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;"><span style="font-variant-ligatures: no-common-ligatures;">## This is the age table of the previous GC...</span></p></div><div id="bloop_customfont" style="margin: 0px;"><br></div><div id="bloop_customfont" style="margin: 0px;">The reason for this seems to be that the age table is printed when the tenuring threshold is calculated from the age table (it should be done on a separate call IMHO), which in G1 is done before a GC.</div><div id="bloop_customfont" style="margin: 0px;"><br></div><div id="bloop_customfont" style="margin: 0px;">Tony</div></div><br><div class="bloop_sign" id="bloop_sign_1471295937684307968"><div style="font-family:helvetica,arial;font-size:13px"><div>-----</div><div><br></div><div>Tony Printezis | JVM/GC Engineer / VM Team | Twitter</div><div><br></div><div>@TonyPrintezis</div><div><a href="mailto:tprintezis@twitter.com">tprintezis@twitter.com</a></div><div><br></div></div></div></body></html>