distributed-system-analysis / pbench

A benchmarking and performance analysis framework
http://distributed-system-analysis.github.io/pbench/
GNU General Public License v3.0
184 stars 108 forks source link

Add flamegraph as a visualization tool #1297

Closed sourabhtk37 closed 4 years ago

sourabhtk37 commented 5 years ago

Flamegraph is an interactive SVG based visualization tool. A D3js plugin is available for flamegraph that can accommodate real time update.

I am sure people are aware of it and have been using it. It would be a great add-on for pbench for understanding what the system is doing.

ndokos commented 4 years ago

It would be great to have a good visualization for perf data (which to date is not visualizable in pbench). If flamegraphs can be used for that, I'd be all for adding a postprocessing script to perf data and incorporating into pbench. And once we have some experience with doing it the "old-fashioned" way, then we could worry about incorporating it into the dashboard as well.

sourabhtk37 commented 4 years ago

@ndokos Awesome. Would love to have that feature. I have also discussed with @Anisha1234 regarding integration of flamegraph in dashboard. Lemme know if I can help.

sourabhtk37 commented 4 years ago

@ndokos @Anisha1234 for flamegraph to work with perf data that we store, perf recording needs to enable call-graph or pass option -g while recording. Else we will be faced with an error such as this:

$ ./flamegraph.pl out.perf-folded > perf-kernel.svg
ERROR: No stack counts found
atheurer commented 4 years ago

We already have support for callgraph, you just need to request this when registering the tool (pbench-rregister-tool --name=perf -- --callgraph). Then, the postprocessing script for perf needs to recognize of the callgraph was used for recording, and if so, then and only then generate a flame graph