Showing results for 
Search instead for 
Did you mean: 

not counted when trying PEBS with perf

Hi Community!

I am trying to use PEBS on kernel 2.6.32 with Intel(R) Xeon(R) CPU E5620.

I typed the following command 

$:sudo perf stat -e r01cb:pp sleep 1

the result is :

 Performance counter stats for 'sleep 1':

     <not counted> r01cb:pp                

       1.001678168 seconds time elapsed

Why is PEBS not counted in my case since the following link indicate that it is avaliable?

0 Kudos
3 Replies

Hello Zhu,

Sorry to reply so late. I missed the initial posting.

If you are still interested... your above command should work. Try running it with a command that actually does something (not a sleep cmd unless you are running other stuff on other cpus that you want to measure). Maybe the sleep cmd made it such that the event never triggered.The event you are using is MEM_LOAD_RETIRED.L1D_HIT on Nehalem so if no memory loads are retired that hit L1D then the count will be 0.

Does the cmd count anything without the '.pp' suffix? Note that you aren't going to get any benefit of PEBS if you are using 'perf stat'. 'perf stat' uses 'counting mode' where perf just counts how many events are seen in an interval. The benefit of PEBS is if you are doing sampling (having perf generate interrupts and getting instruction pointers). The PEBS instructions pointers are more accurate (point closer to the instruction that actually caused the event, the MEM_LOAD_RETIRED.L1D_HIT in this case).




Hi Patrick!

I tried it again using an array traverse in java.

I got this:

sudo perf stat -e r01cb java test

 Performance counter stats for 'java test':

       392,054,606 r01cb                                                       

       8.752079594 seconds time elapsed


sudo perf stat -e r01cb:pp java test

Performance counter stats for 'java test':

   <not supported> r01cb:pp                

       8.723360244 seconds time elapsed

The command seems not being the issue in my case. Weird~ 



Hello Zhu,

I'm not sure why perf is not supporting the PEBS version of the event. Is this a current version of perf?

It looks like the PEBS event should be supported (or at least it is available). I did the following digging to verify that the PEBS event should be available for your cpu (just in case someone is interested):

  • google 'Intel(R) Xeon(R) CPU E5620'
  • click on the 'ARK' link
  • Look at the box on the right hand side to see what type chip it is. The box shows the chip is 'formerly Westmere-EP'
  • Go to
  • I see that there is a dir for 'WSM-EP-SP' and WSM-EP-DP, click on WSM-EP-SP (I don't think it matters in this case whether I click on the SP or DP dir)
  • open the file 'WestmereEP-DP_core_V1.tsv'
  • search for the line beginning with '0xCB'. These are the events you are using.
  • Find the umask= 0x1 event. This is the event you are using. The comment indicates that is a PEBS event (and the last column is '1' which indicates that the event is a PEBS event).

The site gives us access to the same event list as used by VTune (I think). The has a mapping of CPUID family/model to event files.