Can I analyze tcmalloc heap profile dump without golang being part of my environment (pprof can't be installed without go)?

46 views Asked by At

Due to certain restrictions I can not have golang as part of my environment. I would like to use the HEAPPROFILE generated by tcmalloc. To the best of my knowledge only way to make it human readable is using pprof and only way to install pprof is using go. Could someone suggest any alternatives either to pprof or to install pprof without go? Thanks

1

There are 1 answers

0
Aliaksei Kandratsenka On

It is possible to run pprof on a different machine that can host pprof. pprof will require you to point it to addr2line tool compatible with whatever platform you're dealing with. If you also want to have functions from .so files handled, you'll need to have those binaries available too, and pprof being able to find them.

See pprof --help output (for go pprof from github.com/google/pprof). You'll need PPROF_TOOLS environment variable and PPROF_BINARY_PATH (this one is for .so files).

Alternatively, the profile's format is quite simple, and "all" you need is to convert those addresses to function+line, which is pretty easy to script yourself.