Please explain one uncertain
That collect MSR/PCM counters ?
As I understand it, I can collect counters through the perf or through driver on Linux allows to read and write in the MSR registers.
Collected counters show the number of events for each thread (counters binding with thread) or the total number of events occurring in the device ( without binding to the thread, for example the total number of load or store event of all threads of one processor/core without bindig to thread) ?
If MSR counters binding to the thread, whether this means that when you switch context OS(or hardware) save MSR registers in some buffer, and then again when loading context when MSR registers loaded into some buffer ?
This method should theoretically make the overhead of profiling.
What am I wrong?
Sorry for my english