Thank you for all the previous help as I am still new to performance counters.
So, I understood there are 8 general purpose counters and 3 fixed counters per core.
I can use rdmsr to read the counter values at addresses 0xc1, 0xc2 (for general) and 0x309,0x30a, 0x30b for fixed.
I also tried intel pcm from github but that supports only specific events which I can monitor.
So my question is:-
1. How can I map specific event to one of the general purpose counter and read it?
2. Will likwid be helpful in any way?
3. Is there any list of hardware events for guideline?
I have Kaby Lake microarchitecture.
Thank you for joining the Intel Community Support.
In order to provide a detailed answer and assist you better, I recommend you to go to our Intel® Developer Zone. You can find additional information below:
Intel® Developer Zone
Join the Intel® Developer Zone
Please let me know how it goes.