-
Notifications
You must be signed in to change notification settings - Fork 69
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 perf event support #315
Conversation
This reverts commit ce0c3f9.
This PR refactors work-packet level statistics collection. Work packet execution time measuring was hardcoded. It's now abstracted through a WorkCounter trait interface. This PR also makes #315 easier.
This PR refactors work-packet level statistics collection. Work packet execution time measuring was hardcoded. It's now abstracted through a WorkCounter trait interface. This PR also makes mmtk#315 easier.
EDIT: Nvm, the issue is that Intel CPUs do not have as many performance counters as AMD CPUs. I should I realized the issue from the comment at the assertion |
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.
I suggest 1. creating a new type for PerfEventOptions
, and use that in the Options
rather than using a String
, and 2. getting rid of the PERF_EVENTS
global.
This PR supports measuring perf event for work packets.
The added code is guarded behind a feature
perf
due to an upstream bug in bindgen.rust-lang/rust-bindgen#1538
rust-lang/rust#59154