Keil Logo

Event Counters

The Event Counters window displays cumulative numbers, which show how often an event triggered. Open this window through View - Trace - Event Counters.

To display data in this window:

  • Enable Tracing.
  • Enable the event counters dynamically in the window. (Is identical to enabling the counters in Trace Events.)

Event Counters Window

Event counters are performance indicators and can be used as follows:

  • CPICNT : Cycles per Instruction: can be used to indicate Flash wait states. This counter increments on each additional cycle required to execute a multi-cycle instruction, except for those instructions recorded by LSUCNT. It does not count the first cycle required to execute any instruction. The counter also increments on each cycle of any instruction fetch stall.
  • EXCCNT : Exception Overhead: indicates exception frequency. The counter increments on each cycle associated with exception entry or return. That is, it counts the cycles associated with entry stacking, return unstacking, preemption, and other exception-related processes.
  • SLEEPCNT : Sleep Cycles: indicates the time spend in sleep mode. The counter increments on each cycle associated with power saving, whether initiated by a WFI or WFE instruction, or by the sleep-on-exit functionality.
  • LSUCNT : Load Store Unit Cycles: general indication of memory wait states. This counter increments on each additional cycle required to execute a multi-cycle load-store instruction. It does not count the first cycle required to execute any instruction.
  • FOLDCNT : Folded Instructions: indicates instructions that execute in zero cycles. For example, an IT instruction is folded and does not use any cycles.

Using the Window

  • Click Save to store the result in a comma-separated (*.csv) or tab-delimited (*.tab) file.
  • Click Clear to reset all counters.
  • Use the context menu for additional options.
  • Sort the rows by clicking the column header.
  • Hover the mouse over the counter name for name extensions.

Note

  • The values are accurate, provided there are no trace errors.
  • Counters that jump from higher to lower values indicate a trace error. Stop debugging and adjust the trace configuration or the trace speed. Refer to Trace Configuration. The Trace Status bar displays additional information.
  Arm logo
Important information

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies.

Change Settings

Privacy Policy Update

Arm’s Privacy Policy has been updated. By continuing to use our site, you consent to Arm’s Privacy Policy. Please review our Privacy Policy to learn more about our collection, use and transfers
of your data.