Alpha Hardware Monitors


The Alphas have limited hardware support for performance monitoring. The hardware has two counters that are software configurable to count various events. They range from cache misses to branch mispredicts to frozen pipelines. An exact list is in the man page for pfm. These performance counters will count the occurance of events either in kernel routines or user-level routines, and every 4096 events, an interrupt is triggered and information is recorded. (Actually what is recorded is the PC at the time of the 4096th event.) This information is stored in kmon.out or umon.out, and can be read by prof.

There are a few caveats:

The good news is that it is easy to take profile date. See the man pages on an Alpha for uprofile (the user level profiler), kprofile (the kernel profiler), and pfm (a description of the statistics that can be gathered.