2017-02-22 52 views
1

我有gctrace輸出看起來像這樣:閱讀轉到gctrace輸出

gc 6 @48.155s 15%: 0.093+12360+0.32 ms clock, 0.18+7720/21356/3615+0.65 ms cpu, 11039->13278->6876 MB, 14183 MB goal, 8 P 

我不知道如何在特定的讀取CPU時間。我瞭解它分爲三個階段(STW掃描終止,併發標記/掃描和STW標記終止),但我不確定+符號的含義(即0.18+77203615+0.65)。這些+符號代表什麼?

回答

1

就你而言,它們看起來像是輔助和終止時間;

// CPU time 
0.18 : **STW** Sweep termination. 
7720ms : Mark/Scan - Assist Time (GC performed in line with allocation). 
21356ms : Mark/Scan - Background GC time. 
3615ms : Mark/Scan - Idle GC time. 
0.65ms : **STW** Mark termination. 

我認爲它改變(或者可能)在各種圍棋版本,你可以在runtime package docs找到更詳細的信息。也

Currently, it is: 
    gC# @#s #%: #+#+# ms clock, #+#/#/#+# ms cpu, #->#-># MB, # MB goal, # P 
where the fields are as follows: 
    gC#  the GC number, incremented at each GC 
    @#s   time in seconds since program start 
    #%   percentage of time spent in GC since program start 
    #+...+#  wall-clock/CPU times for the phases of the GC 
    #->#-># MB heap size at GC start, at GC end, and live heap 
    # MB goal goal heap size 
    # P   number of processors used 

here

Interpreting GC trace output

gc 6 @48.155s 15%: 0.093+12360+0.32 ms clock, 
0.18+7720/21356/3615+0.65 ms cpu, 11039->13278->6876 MB, 14183 MB goal, 8 P 
  • GC 6
  • @ 48.155s自節目開始
  • 15%:自方案在GC上花費的時間開始
  • 0.093 + 12360 + 0.32 ms的時鐘停止的世界(STW)掃描終止+併發 標記和掃描+和STW標記末端
  • 0.18 + 7720 /3615分之21356+ 0.65毫秒CPU,背景GC時間和空閒時間GC
  • 11039-> 13278-> 6876 MB堆大小在GC開始(在 與分配線執行的GC),在GC結束,並且活堆
  • 8 P使用的處理器數量