Software Tuning, Performance Optimization & Platform Monitoring
Discussion regarding monitoring and software tuning methodologies, Performance Monitoring Unit (PMU) of Intel microprocessors, and platform updating.

How to properly use the PMC0 and PMC1 performance counters


Hi all,

I have a question regarding on how to use the PMC0 and PMC1 together with the APIC_LVTPC. I have developed 2 Linux kernel modules. First, reads PEBS and second, reads LBR. I use PMC0 and PMC1 to count the event.

My problem is that if I load PEBS module and than LBR reading module than only the LBR module working properly. If I load first the LBR module than the PEBS module is not working properly. Somehow the second module is shadowing the first one.

Is there something that I miss? Can the APIC_LVTPC register used with only one event at a time?

Please have a look at the code of PEBS module and LBR module here:



0 Kudos
0 Replies