flamegraph-rs / flamegraph

Easy flamegraphs for Rust projects and everything else, without Perl or pipes <3
Apache License 2.0
4.61k stars 141 forks source link

Add kernel, global, and timeout flags #334

Open mkeeter opened 1 month ago

mkeeter commented 1 month ago

We've been using flamegraph for full-system benchmarking at Oxide, relying heavily on custom sampling commands (since it only samples one process by default). This PR would let us stop using custom commands by adding their functionality into the main flamegraph executable:

The results are pretty neat:

fg4

I have only implemented these flags for the DTrace backend, but perf will print helpful error messages if you try to use them. If you want to maintain strict CLI parity, let me know and I can dig into what perf changes would be required.

djc commented 1 month ago

If you want to maintain strict CLI parity, let me know and I can dig into what perf changes would be required.

Yeah, would be nice if you could spend at least a little time on this.