A number of on-line resources are available to assist engineers with performance measurement, analysis and improvement. These resources, and many more, can be found at AMD Dev Central.
Performance measurement hardware and events are described in the "BIOS and Kernel Developer's Guide for AMD Athlon 64 and AMD Opteron Processors," Publication #26094. The "BKDG" is the main resource for details about the hardware events themselves and what they measure. These details include important information about conditions affecting event counts, i.e., what gets and what doesn't get included in an event count. The BKDG also describes how the "unit masks" associated with each event can be configured to narrow measurement to more specific hardware conditions.
Performance guidelines and tips for AMD64 processors are given in the "Software Optimization Guide for AMD64 Processors," Publication #25112. The software optimization guide is a resource for engineers and developers who wish to use the processor microarchitecture in order to achieve the best performance. The guide contains a brief introduction to processor microarchitecture which all performance engineers and software developers will find useful.
Many techniques for program performance tuning on AMD Athlon 64 and AMD Opteron Processors can be found in the white paper titled "Performance Optimization of 64-bit Windows Applications for AMD Athlon 64 and AMD Opteron Processors using Microsoft Visual Studio 2005" by Michael Wall. Although this paper addresses Microsoft Visual Studio 2005 specifically, many of the techniques can be employed when working with other compilers or on Linux.
The Developer Tools page at AMD Dev Central lists a wide range of tools -- from compilers to libraries to simulators -- that can be used effectively to improve the performance of programs on AMD64 processors. The list includes several profiling tools to measure and analyze the performance and behavior of application programs.
AMD provides its own profiling tool, CodeAnalyst, through AMD Dev Central. AMD CodeAnalyst is available for both the Windows and Linux operating systems. AMD CodeAnalyst on Linux is open source making it an attractive, low-cost option for university education as well as industrial-strength analysis.
A brief introduction to AMD CodeAnalyst is presented in the white paper "An introduction to analysis and optimization with AMD CodeAnalyst" by P.J. Drongowski. We will use AMD CodeAnalyst in Section 5 to illustrate the use of event-based performance measurements. Please note, however, that the performance measurements described in this paper can be used with other profiling tools like oprofile, the Performance API (PAPI), or SunStudio on Solaris.