mstange / samply

Command-line sampling profiler for macOS and Linux
Apache License 2.0
2.12k stars 51 forks source link

Differential flamegraphs / raw stack output #74

Open domodwyer opened 10 months ago

domodwyer commented 10 months ago

First off: samply is my go-to tool for profiling these days - the UX is great, the symbol resolving is great, everything just works and re-using the firefox profiler is a stroke of genius - amazing work!

I often find I need to understand what changed between two benchmark runs. It's not uncommon to run a set of benchmarks, and find that everything is faster (on a good day!) after some changes except one or two specific cases. I would usually go to look at those cases with a differential flamegraph to see if there's an easily attributable cause.

I assume the firefox profiler can't easily be wrangled into showing this kind of diff output (if it could, that'd be amazing) but would it be possible for samply to output the raw stacks for post-processing?

ishitatsuyuki commented 10 months ago

You can diff profiles. Just go to https://profiler.firefox.com/compare/.

domodwyer commented 10 months ago

Well that is amazing! There doesn't seem to be an easy way to look at the local profiles though - I guess it has to be uploaded first so they can be pulled via http.

I see there's an existing ticket to add local comparison/upload to the profiler: https://github.com/firefox-devtools/profiler/issues/4595