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 support for Raw Events #38

Merged
merged 10 commits into from
Oct 4, 2023
Merged

Conversation

janaknat
Copy link
Contributor

@janaknat janaknat commented Oct 3, 2023

perf-event/src/events/raw.rs Fixed Show fixed Hide fixed
perf-event/src/events/raw.rs Fixed Show fixed Hide fixed
Copy link
Owner

@Phantomical Phantomical left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR! LGTM with one comment about the example. The values don't work on my machine (not surprising) so having a comment on what platform/vendor they're supposed to work on would be helpful.

I've added a few different changes to make it a bit easier to use in the common case, improve documentation, and clean up things a bit.

Comment on lines +5 to +6
let insns_retired: Raw = Raw::new(0x08);
let cpu_cycles: Raw = Raw::new(0x11);
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you have a link or somewhere that describes where these values come from and what platform they're valid for? The example is useful but not likely to work on most people's machines. At the very minimum a comment describing what platform this is expected to work on would be useful.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah. These are armv8 pmu events. I was using the Neoverse Technical reference: https://developer.arm.com/documentation/100616/0400/debug-descriptions/performance-monitor-unit/pmu-events.

@Phantomical Phantomical merged commit 7bea0ea into Phantomical:master Oct 4, 2023
6 checks passed
@Phantomical
Copy link
Owner

Again, thanks for the PR! I'll put out a new release later tonight when I have the time.

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