We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
...;; _setCounting(1)ee19 1f1c mrc 15, 0, r1, cr9, cr12, {0}f041 0001 orr.w r0, r1, #1ee09 0f1c mcr 15, 0, r0, cr9, cr12, {0};; _resetClockCounter();ee19 3f1c mrc 15, 0, r3, cr9, cr12, {0}f043 0704 orr.w r7, r3, #4ee09 7f1c mcr 15, 0, r7, cr9, cr12, {0};; _resetEventCounters();ee19 6f1c mrc 15, 0, r6, cr9, cr12, {0}f046 0c02 orr.w ip, r6, #2ee09 cf1c mcr 15, 0, ip, cr9, cr12, {0};; _selectPerfCounter(0);;; _setPerfCounterFunction( count0func=0x8 );2200 movs r2, #0ee09 2fbc mcr 15, 0, r2, cr9, cr12, {5}2108 movs r1, #8ee09 1f3d mcr 15, 0, r1, cr9, cr13, {1};; _selectPerfCounter(1);;; _setPerfCounterFunction( count1func=0xf );2001 movs r0, #1ee09 0fbc mcr 15, 0, r0, cr9, cr12, {5}230f movs r3, #15ee09 3f3d mcr 15, 0, r3, cr9, cr13, {1};; _selectPerfCounter(2);;; _setPerfCounterFunction( count2func=0x11 );2702 movs r7, #2ee09 7fbc mcr 15, 0, r7, cr9, cr12, {5}2611 movs r6, #17ee09 6f3d mcr 15, 0, r6, cr9, cr13, {1};; _selectPerfCounter(3);;; _setPerfCounterFunction( count3func=0x40 );2203 movs r2, #3ee09 2fbc mcr 15, 0, r2, cr9, cr12, {5}2140 movs r1, #64 ; 0x40ee09 1f3d mcr 15, 0, r1, cr9, cr13, {1};; _enableCounters(1, 1, 1, 1, 1);200f movs r0, #15f2c8 0000 movt r0, #32768 ; 0x8000ee09 0f3c mcr 15, 0, r0, cr9, cr12, {1}...
PMNC: 41002001 CNTENS: 8000000f CNTENC: 8000000f FLAG: 00000000 CCNT: 0000009f PMCNT0: 00000000 PMCNT1: 00000000 PMCNT2: 00000000 PMCNT3: 00000000 USEREN: 00000001
Hi TedM,I am experiencing the same problems of not getting the performance counters to work - they always contain 0. But I have this problem also in the kernel. I'm working with the OMAP3430-based Nokia N900 phone which uses the ARM Cortex A-8. Maybe you have some idea of what I am doing wrong here? Here is my code, running in the init-method of a kernel module, thus in privileged mode:...As you can see, the cycle counter works just fine, but the first event counter, which should count the number of issues instructions (0x55), contains 0. As far as I can see, both PMNC and CNTENS indicate that the counter should be active. I have even made sure the kernel does not put any hardware to sleep when idling, to avoid loosing state, although it should anyway not happen printk().I was hoping maybe you have some idea of what is wrong here. Did you gain any recent insights wrt. secured privileged mode? Could this be the issue also with my code? I did not figure out how to put the CPU in this mode, as I thought that running in privileged mode in the kernel was sufficient...