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 the MSR event support #27

Merged
merged 10 commits into from
May 26, 2023
Merged

Add the MSR event support #27

merged 10 commits into from
May 26, 2023

Conversation

yangxi
Copy link
Contributor

@yangxi yangxi commented May 24, 2023

No description provided.

@Phantomical Phantomical self-requested a review May 25, 2023 19:13
@Phantomical
Copy link
Owner

Thanks for the PR!

Is there any documentation for what the MSR counters mean? I found an enum in the kernel source that has more than what's added here but no documentation for it.

@Phantomical
Copy link
Owner

Looking a bit more, it seems like the best documentation for these would be the intel reference manuals using the actual MSR register names from here.

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.

This ended up being a rather big review. Some general comments:

  • Please run cargo +nightly fmt. That will make sure to get your comments formatted properly
  • Please fix the clippy warnings.

The msr kernel perf module is x86-specific. It is better to indicate
that to users of the crate directly. In addition, this way when more
event types come we don't have to worry about, for example, the x86 MSR
event and the ARM MSR event having a name clash.
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.

This LGTM! Thanks for the PR!

@Phantomical Phantomical merged commit 7555c4c into Phantomical:master May 26, 2023
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