System information
Perfmon2—Hardware-Based Performance Monitoring 93
Perfmon2—Hardware-
Based Performance
Monitoring
7
Perfmon2 is a standardized, generic interface to access the performance monitoring
unit (PMU) of a processor. It is portable across all PMU models and architectures,
supports system-wide and per-thread monitoring, counting and sampling.
7.1 Conceptual Overview
The following subsections give you a brief overview about Perfmon.
7.1.1 Perfmon2 Structure
Performance monitoring is “the action of collecting information related to how an ap-
plication or system performs”. The information can be obtained from the code or the
CPU/chipset.
Modern processors contain a performance monitoring unit (PMU). The design and
functionality of a PMU is CPU specific: for example, the number of registers, coun-
ters and features supported will vary by CPU implementation.
The Perfmon interface is designed to be generic, flexible and extensible. It can mon-
itor at the program (thread) or system levels. In either mode, it is possible to count
or sample your profile information. This uniformity makes it easier to write portable
tools. Figure7.1, “Architecture of perfmon2” (page94) gives an overview.