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

Is user + kernel counting supported for the fixed PMCs? #22

Open
travisdowns opened this issue Aug 16, 2018 · 1 comment
Open

Is user + kernel counting supported for the fixed PMCs? #22

travisdowns opened this issue Aug 16, 2018 · 1 comment

Comments

@travisdowns
Copy link
Contributor

I'm using the fixed UNHALTED_CYCLES event in uarch-bench but it is counting only user-cycles, not kernel cycles.

To fix travisdowns/uarch-bench#34 I'd like it to count both. Do you know if this is even possible with the fixed PMCs, and can libpfc be told to do that?

Don't do any work to support this, just curious if you knew if it's already possible.

@obilaniu
Copy link
Owner

obilaniu commented Aug 16, 2018

@travisdowns The answer is "Yes"!

The code that supports it is here. You just need to add :a to the config string. The default is implicitly :u.

EDIT and for the fixed-function counters, a full enable is 3. Bit 0 is kernel-mode enable, Bit 1 is user-mode enable.

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

No branches or pull requests

2 participants