Hi,
I want to measure CPU cycles for a sub routine.
I am using routines provided in sys_pmu.asm which has come as a part of installation.
I am calling the functions in the following manner:
_pmuInit_();
_pmuEnableCountersGlobal_();
_pmuSetCountEvent_(pmuCOUNTER0, PMU_CYCLE_COUNT); // PMU_INST_ARCH_EXECUTED
_pmuResetCounters_();
_pmuStartCounters_(pmuCOUNTER0);
aCycleCountStart = _pmuGetEventCount_(pmuCOUNTER0);
/*****************************************************************/
CODE TO BE PROFILED
/*****************************************************************/
_pmuStopCounters_(pmuCOUNTER0);
aCycleCountEnd = _pmuGetEventCount_(pmuCOUNTER0);
aTotalCycles = aCycleCountEnd - aCycleCountStart;
I am not able to get the cycles. I am getting 0 values for cycle counts.
What I am doing wrong in the above implementation?
Thanks and Regards
sridhar artham