Kyl*_*ndt 6 go pprof heap-profiling
当我使用pprof配置堆时,我得到以下内容:
但是,我不清楚如何解释这种可视化.特别是:
"箭头旁边的记忆意味着_____并且盒子里面的记忆意味着______.所以当一个盒子里有多个箭头时,它意味着_____,当它有多个箭头时,就意味着_____".
Dim*_*rov 11
堆与CPU分析模式之间的箭头含义没有区别.
您可能对toppprof命令的输出感兴趣,它可以通过以下形式为您提供结果:
9701.61kB of 9701.61kB total ( 100%) Dropped 112 nodes (cum <=
48.51kB) Showing top 10 nodes out of 29 (cum >= 3611.54kB)
flat flat% sum% cum cum%
4549.72kB 46.90% 46.90% 4549.72kB 46.90% mystery.function
2587.52kB 26.67% 73.57% 2587.52kB 26.67% reflect.unsafe_NewArray
1024.02kB 10.56% 84.12% 1024.02kB 10.56% encoding/xml.copyValue
514kB 5.30% 89.42% 514kB 5.30% compress/gzip.NewReader
514kB 5.30% 94.72% 514kB 5.30% net/http.(*Transport).dialConn
512.34kB 5.28% 100% 512.34kB 5.28% runtime.makeslice
0 0% 100% 514kB 5.30% bytes.(*Buffer).ReadFrom
0 0% 100% 3611.54kB 37.23% encoding/xml.(*Decoder).Decode
0 0% 100% 3611.54kB 37.23% encoding/xml.(*Decoder).DecodeElement
0 0% 100% 3611.54kB 37.23% encoding/xml.(*Decoder).unmarshal
Run Code Online (Sandbox Code Playgroud)
这里是(恕我直言)使用pprof进行Go堆分析的两个最佳参考:
| 归档时间: |
|
| 查看次数: |
2301 次 |
| 最近记录: |