This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Help configuring A57 performance counters

I'm attempting to configure the performance counters on a Jetson TX1 which has the 64 bit cortex-A57. I'm trying to decipher the technical reference manual and use this guide Using the PMU Event Counters in DS-5 – DS-5 Development Studio – ARM Developer  to attempt to set up the counters. The end goal is to be able to configure each counter individually and query each one on demand. Any help or guidance to help me accomplish this would be greatly appreciated. My understanding is that because its a 64 bit system I access the counters with the MSR/MRS rather than through p15. This is my reference that I've been working through to access the counters: ARM Information Center .

So far i have attempted to read, modify, write and the value is not writing properly along with a number of other issues.

  1. asm volatile ("MRS %0,PMCR_EL0\n":"=r" (value));
  2. value = value | 4;
  3. asm volatile ("MSR PMCR_EL0, %0\n"::"r" (value));
  4. asm volatile ("MRS %0,PMCR_EL0\n":"=r" (value));

The reference manual doesn't explicitly state how to set up the individual counters any help in this area will be appreciated. Thanks.