pprof堆报告显示原始内存地址。

huangapple go评论80阅读模式
英文:

The pprof heap report displays raw memory addresses

问题

根据您提供的内容,以下是翻译的结果:

根据这个指南http://golang.org/pkg/net/http/pprof/,我正在尝试查看堆报告。当我导航到适当的URL时,显示的内容如下:

pprof堆报告显示原始内存地址。
<!-- 来源:http://oi41.tinypic.com/14ag7iw.jpg -->

我尝试过ActivePerl、StrawberryPerl和随MSYS工具一起提供的Perl。问题出在哪里?

英文:

Following this guide http://golang.org/pkg/net/http/pprof/, i'm trying to look at the heap report. When i navigate to the appropriate url, this is what is displayed:

pprof堆报告显示原始内存地址。
<!-- source: http://oi41.tinypic.com/14ag7iw.jpg -->

I tried this with ActivePerl, StrawberryPerl and the Perl coming with MSYS tools. What is the issue here?

答案1

得分: 2

net/http/pprof包的输出最好与go tool pprof一起使用。如果您的服务器正在监听6060端口,您将需要一个命令,例如go tool pprof http://localhost:6060/debug/pprof/heap。在net/http/pprof包的文档中有关于如何使用pprof工具的解释,您可以在http://blog.golang.org/profiling-go-programs找到相关链接。

如果您真的有兴趣尝试自己阅读输出结果,您可以在之前尝试的URL中添加?debug=1,但我不建议这样做。

英文:

The output of the net/http/pprof package is best used with go tool pprof. If your server is listening on port 6060, you'll want a command like go tool pprof http://localhost:6060/debug/pprof/heap. There's an explanation of how to use the pprof tool at http://blog.golang.org/profiling-go-programs, which is linked from the net/http/pprof package docs.

If you're really interested in trying to read the output yourself, you can add ?debug=1 to the url you tried before - but I can't recommend it.

huangapple
  • 本文由 发表于 2014年1月3日 14:43:19
  • 转载请务必保留本文链接:https://go.coder-hub.com/20898118.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定