22007E/0 — November 1999

AMD Athlon™ Processor x86 Code Optimization

Appendix D

Performance-Monitoring

Counters

This chapter describes how to use the AMD Athlon™ processor performance monitoring counters.

Overview

The AMD Athlon processor provides four 48-bit performance counters, which allows four types of events to be monitored simultaneously. These counters can either count events or measure duration. When counting events, a counter is incremented each time a specified event takes place or a specified number of events takes place. When measuring duration, a counter counts the number of processor clocks that occur while a specified condition is true. The counters can count events or measure durations that occur at any privilege level. Table 11 on page 164 lists the events that can be counted with the performance monitoring counters.

Performance Counter Usage

The performance monitoring counters are supported by eight

MSRs — PerfEvtSel[3:0] are the performance event select

MSRs, and PerfCtr[3:0] are the performance counter MSRs.

Overview

161

Page 177
Image 177
AMD x86 manual Performance-Monitoring Counters, Performance Counter Usage