阅读转到gctrace输出
问题描述:
我有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+7720
和3615+0.65
)。这些+符号代表什么?
答
就你而言,它们看起来像是辅助和终止时间;
// 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
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使用的处理器数量