Keil Logo Arm Logo

J-Link/J-Trace User's Guide

Event Counters Window

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

To retrieve data in this window, you must:

  • Enable Tracing.
  • Enable the event counters in the dialog Options for Target - Debug - Settings - Trace. See Trace Events.

Event Counters Window

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

  • CPICNT : Exception overhead cycle: 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 : Extra Cycle per Instruction: 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.
  • Trace errors occur, when numbers jump from higher to lower values. Stop debugging and adjust the trace configuration or the trace speed.

arm-logo-small

Keil logo
Important information

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