pprof diff_base

go run github.com/google/pprof -http localhost:8080 -diff_base A.pb.gz B.pb.gz




https://gitmemory.com/issue/google/pprof/483/557658797



Red/Blue Differential Flame Graphs
I’ve had many discussions about this for years, and finally wrote an implementation that I hope makes sense. It works like this:



Take stack profile 1.
Take stack profile 2.
Generate a flame graph using 2. (This sets the width of all frames using profile 2.)
Colorize the flame graph using the “2 - 1” delta. If a frame appeared more times in 2, it is red, less times, it is blue. The saturation is relative to the delta.
The intent is for use with before & after profiles, such as for non-regression testing or benchmarking code changes. The flame graph is drawn using the “after” profile (such that the frame widths show the current CPU consumption), and then colorized by the delta to show how we got there.



The colors show the difference that function directly contributed (eg, being on-CPU), not its children.



https://www.brendangregg.com/blog/2014-11-09/differential-flame-graphs.html



go tool pprof -png cpu_profile1 Format: “png” not recognized. Use one of: canon cmap cmapx cmapx_np dot dot_json eps fig gv imap imap_np ismap json json0 mp pic plain plain-ext pov ps ps2 svg svgz tk vdx vml vmlz xdot xdot1.2 xdot1.4 xdot_json failed to execute dot. Is Graphviz installed? Error: exit status 1



./configure –with-gts –prefix ~



https://stackoverflow.com/questions/35688320/graphviz-seems-doesnt-support-png-and-map



https://github.com/tamarin-prover/tamarin-prover/issues/290



https://gitlab.com/graphviz/graphviz/-/issues/1414



https://mamchenkov.net/wordpress/2019/01/15/graphviz-dot-format-png-not-recognized/



Category golang