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

How to use perf_event_open() to monitor the events which not in the enum struct perf_hw_id? #103

Open
starsparkling opened this issue Feb 24, 2021 · 0 comments

Comments

@starsparkling
Copy link

I want to use the perf_event_open() to monitor the events (such as mem_load_l3_miss_retired.remote_pmm、mem_load_retired.local_pmm). The doucument of linux\perf\design.txt says as follow. But how to get the event_id of a specific event (such as mem_load_l3_miss_retired.remote_pmm、mem_load_retired.local_pmm)?

The 'config' field specifies what the counter should count. It is divided into 3 bit-fields:
raw_type: 1 bit (most significant bit) 0x8000_0000_0000_0000
type: 7 bits (next most significant) 0x7f00_0000_0000_0000
event_id: 56 bits (least significant) 0x00ff_ffff_ffff_ffff
If 'raw_type' is 1, then the counter will count a hardware event specified by the remaining 63 bits of event_config. The encoding is machine-specific.

Thanks, Looking forward to your reply.

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

1 participant