I was looking for ways to program PEBS counters in such a way that I can modify the PEBS-Counter Reset value to something other than zero. This is because I want to see if I can log more memory-access samples than I usually do when the counter reset value is zero. Is there any sample code or sources that I can see and understand in order to program the PEBS counters on my own ?
I have already read the Intel SDM Chapter 18 to understand how PEBS counters work and the steps involved to modify the counters. But I wanted to see some sample code that would help me to understand how it is done in code.
Thanks for the help. Yes I saw there is a simple reference loadable kernel driver for PEBS available in Andi-Kleen's PMU tools. I hope I can use it for testing purposes.