Hi,

An update on this patch.

I can confirm that I can successfully read PMU events counters if I supply a 
JTAG clock.

However, as I said, I could also read them with this patch. I took the approach 
of comparing the cpu cycles event with the corresponding PMU event counter. The 
value obtained with the JTAG clock is more exact than the one with this patch.

Current code, no JTAG clock:

perf stat -e r11 sleep 1
 Performance counter stats for 'sleep 1':
                 0 r11                                                         
       1.005361000 seconds time elapsed

perf stat -e cycles sleep 1
 Performance counter stats for 'sleep 1':
           1594953 cycles                    #    0.000 GHz                    
       1.005478333 seconds time elapsed

JTAG clock:

 perf stat -e r11 sleep 1

 Performance counter stats for 'sleep 1':
           1535519 r11                                                         
       1.005299334 seconds time elapsed

Applying the enclosed user mode access patch:

 Performance counter stats for 'sleep 1':
            409200 r11                                                         
       1.005370667 seconds time elapsed

This makes sense in that the Linux kernel running in privileged mode does not 
need to configure the non-invasive debug bits for user mode access.

However, I am still puzzled as to why configuring those bits I am able to read 
data from the PMU at all.

Bottom line, please ignore the patch.

Alex
-- 
_______________________________________________
meta-freescale mailing list
[email protected]
https://lists.yoctoproject.org/listinfo/meta-freescale

Reply via email to