
60
32000D–04/2011
AVR32
7.4
Usage
The performance counters can be used to monitor several different events and perform different
measurements. Some of the most useful are explained below.
7.4.1
Cycles per instruction
CONF0: 0x7 (Instruction executed)
CPI = CCNT / PCNT0
Cycles-per-instruction (CPI) measures the average time it took to execute an instruction.
7.4.2
Icache miss rate
CONF0: 0x7 (Instruction executed)
CONF1: 0x0 (Icache miss)
ICMR = PCNT1 / PCNT0
The instruction cache miss rate (ICMR) mesures the fraction of instruction cache misses per
executed instruction.
7.4.3
Dcache read miss rate
CONF0: 0xE (Dcache read access)
CONF1: 0xA (Dcache read miss)
DCMR = PCNT1 / PCNT0
The data cache read miss rate (DCRMR) mesures the fraction of data cache read misses per
data cache read access.
7.4.4
Average instruction fetch miss latency
CONF0: 0x1 (Instruction fetch stall)
CONF1: 0x0 (Icache miss)
AIFML = PCNT0 / PCNT1
The average instruction fetch miss latency (AIFML) mesures the average number of clock cycles
spent per instruction cache miss. This measure does not consider cycles spent due to ITLB
misses.
7.4.5
Fraction of execution time spent stalling due to instruction fetch misses
CONF0: 0x1 (Instruction fetch stall)
AIFML = PCNT0 / PCCNT
The fraction of execution time spent stalling due to instruction fetch misses mesures the ratio of
clock cycles spent waiting for an instruction to be fetched to the total number of execution
cycles.
7.4.6
Average writeback stall duration
CONF0: 0x8 (Write buffer full occurrences)
CONF1: 0x9 (Write buffer full cycles)