Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add kernel, global, and timeout flags #334

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

mkeeter
Copy link

@mkeeter mkeeter commented Aug 12, 2024

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:

  • --kernel changes the flamegraph probe to also capture kernel stack frames
  • --global captures a flamegraph of everything in the system, instead of a single process
  • --timeout tells flamegraph to exit after a certain amount of time, e.g. to capture 1 second of full-system traces

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
Copy link
Contributor

djc commented Aug 12, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants