我有gc日誌啓用-XX:+PrintTenuringDistribution
。但我對下面的時間分配感到困惑。如何讀取+ PrintTenuringDistribution的輸出
從我讀到的情況來看,第一個gc中的年齡1(從1 GC中存活)中有10532656個字節。在第二個gc中,2歲的9178824字節(從2個GC中存活)。這很好,因爲一些對象在第一個和第二個GC之間死亡。
但是在第二個GC中,16101552個字節在3歲時,而在第一個GC中僅2歲時爲14082976個字節。我不明白爲什麼這個數字在增加。 n年齡段的所有字節是不是應該來自前一個GC的年齡n-1?或者我誤解了這些數字?
謝謝。
2013-10-19T19:46:30.244+0800: 169797.045: [GC2013-10-19T19:46:30.244+0800: 169797.045: [ParNew
Desired survivor size 87359488 bytes, new threshold 4 (max 4)
- age 1: 10532656 bytes, 10532656 total
- age 2: 14082976 bytes, 24615632 total
- age 3: 15155296 bytes, 39770928 total
- age 4: 13938272 bytes, 53709200 total
: 758515K->76697K(853376K), 0.0748620 secs] 4693076K->4021899K(6120832K), 0.0756370 secs] [Times: user=0.42 sys=0.00, real=0.07 secs]
2013-10-19T19:47:10.909+0800: 169837.710: [GC2013-10-19T19:47:10.909+0800: 169837.711: [ParNew
Desired survivor size 87359488 bytes, new threshold 4 (max 4)
- age 1: 9167144 bytes, 9167144 total
- age 2: 9178824 bytes, 18345968 total
- age 3: 16101552 bytes, 34447520 total
- age 4: 21369776 bytes, 55817296 total
: 759449K->63442K(853376K), 0.0776450 secs] 4704651K->4020310K(6120832K), 0.0783500 secs] [Times: user=0.43 sys=0.00, real=0.07 secs]
編輯:
這已被確認爲JVM本身的錯誤是由於聲稱該對象的競爭條件。
的詳細討論可以在這裏找到:
http://mail.openjdk.java.net/pipermail/hotspot-gc-use/2013-October/001635.html
什麼看起來很腥,我建議你在OpenJDK郵件列表中詢問[email protected] –
謝謝阿列克謝。我收到了郵件列表的回覆。這實際上是jvm中的一個錯誤。 –