-
Notifications
You must be signed in to change notification settings - Fork 82
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 support for profiling benchmarks using perf-record
#214
Conversation
Add a hook that profiles benchmarks using `perf-record` when enabled
I will try to take a look at it by this weekend :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for doing this. This is a tricky one to add a test and CI for -- I did test it locally and it "worked for me". I think for most purposes we can rely on bench_runner to ensure this doesn't bit rot.
Would you like to update the documentation for it? https://github.com/psf/pyperf/blob/f3131745472b108b95cd5e20733cdf4a20ec0a37/doc/run_benchmark.rst#specializer-statistics-pystats |
Ahh, thanks for the nudge. I've been heads down finishing up the LOAD_FAST optimization. I should be able to wrap this up on Friday. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
This PR adds support for profiling benchmarks using a
perf-record
hook.perf-record
is enabled only during benchmark execution by using perf's support for control fifos.For example, to collect stacks using DWARF debug information, one could run:
This should resolve #213.