I have been working on profiling a golang program and trying to generate differential flame graph of two pprof files.
Steps:
- generate
first.pproffile - improve code, then generate
second.pproffile ./stackcollapse-go.pl first.pprof > before.folded
But it seems that the stackcollapse-go.pl does not work as I expected, the before.folded is empty.
So what's the right way to generate differential flame graph of go program?
stackcollapse-go.pldoesn't take in the raw protobuf. You need to translate your .pprof into the right textual format.So first we get the raw data, suitable for passing to
stackcollapse-go.plNow we can pass it through
stackcollapse-go.plYou can then use the flamegraph.pl script to get the final svg