rust-lang / rust-lang/rustc-perf
Adding `lightswitch` as a profile tool
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 733
- Forks
- 189
- Avg merge
- 10h 52m
- Merged PRs (30d)
- 43
Description
Hi,
Would you be open / interested in adding lightswitch as one of the available profilers? I thought of posting here after lurking in Rust's zulip and seeing some mentions of the issues of dealing with other profilers (cc @bal-e).
The TL;DR is:
- x86_64 and arm64 Linux only, frame pointers not necessary;
- support deeper stacks thanks to not using
PERF_SAMPLE_STACK_USER, as of now, no limits in terms of process stack, and up to 200 user + kernel frames; - various output modes, including to the Firefox profiler, SVG flamegraph, Perfetto, and others;
- written in Rust :)
I think right now the biggest blocker compared to other profilers is that it doesn't accept a command to run and profile, it can either profiler the whole box of the specified pids. This is something I am planning on adding soon and can prioritise if this would be useful.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing rustc-perf's existing profiler integrations and the lightswitch profiler entry points, including src/bpf/profiler.h. Clarify whether lightswitch must first support profiling a command, then define how it should be exposed and how its supported Linux architectures and output modes are handled. Done means lightswitch is available through rustc-perf with the agreed invocation and verified output.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- performance
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100