There is a pprof utility in google-perftools package. It is utility to convert profile files from google-perftools cpuprofiler and heapprofiler into beautiful images: like https://github.com/gperftools/gperftools/tree/master/doc/pprof-test-big.gif and https://github.com/gperftools/gperftools/tree/master/doc/heap-example1.png
The format of pprof's input file is described for cpu profiles here: https://github.com/gperftools/gperftools/tree/master/doc/cpuprofile-fileformat.html
but the format of heap profile
input files is not described in the svn.
What is the "heapprofiling" format and how can I generate such file from my code? I already can generate cpuprofiler format, so I interested what are the difference between two formats.
Seems the format is not binary as for cpu profiler, but textual:
First line:
Regex (not full)
where
Then a profile itself follows in lot of lines:
where "1: 2" and "3: 4" is of the same meaning as in first line; but only malloced from given callsite; 0x00001 0x00002 is callstack of the callsite.
Then empty line and "MAPPED_LIBRARIES:". From the next line something very like copy of the /proc/pid/maps follows.