Add support for profiling benchmarks using perf-record#214
Merged
Add support for profiling benchmarks using perf-record#214
perf-record#214Conversation
Add a hook that profiles benchmarks using `perf-record` when enabled
Member
|
I will try to take a look at it by this weekend :) |
corona10
reviewed
Feb 5, 2025
corona10
reviewed
Feb 5, 2025
mdboom
approved these changes
Feb 5, 2025
Collaborator
mdboom
left a comment
There was a problem hiding this comment.
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.
Member
|
Would you like to update the documentation for it? https://github.com/psf/pyperf/blob/f3131745472b108b95cd5e20733cdf4a20ec0a37/doc/run_benchmark.rst#specializer-statistics-pystats |
Collaborator
Contributor
Author
|
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. |
Contributor
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR adds support for profiling benchmarks using a
perf-recordhook.perf-recordis 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.