Adds support to the Linux kernel for using the Performance-Monitoring Counters
perfctr is an application that adds support to the Linux kernel (2.4.16 or newer) for using the Performance-Monitoring Counters (PMCs) found in many modern processors.

Supported processors are:
- All Intel Pentium processors, i.e., Pentium, Pentium MMX, Pentium Pro, Pentium II, Pentium III, Pentium M and Pentium 4, including Celeron and Xeon versions.
- The AMD K7 and K8 processor families.
- Cyrix 6x86MX, MII, and III.
- VIA C3 (Cyrix III).
- Centaur WinChip C6/2/3.
- PowerPC 604, 7xx, and 74xx processors.

Main features:

  • Each Linux process has its own set of "virtual" PMCs. That is, to a process the PMCs appear to be private and unrelated to the activities of other processes in the system. The virtual PMCs have 64-bit precision, even though current processors only implement 32, 40, or 48-bit PMCs. Each process also has a virtual Time-Stamp Counter (TSC). On most machines, the virtual PMCs can be sampled entirely in user-space without incurring the overhead of a system call.
  • A process accesses its virtual PMCs by opening /dev/perfctr and issuing system calls on the resulting file descriptor. A user-space library is included which provides a more high-level interface.
  • The driver also supports global-mode or system-wide PMCs. In this mode, each PMC on each processor can be controlled and read. The PMCs and TSC on active processors are sampled periodically and the accumulated sums have 64-bit precision. Global-mode PMCs are accessed via the /dev/perfctr device file; the user-space library provides a more high-level interface.
  • The user-space library is accompanied by several example programs that illustrate how the driver and the library can be used.
  • Support for performance-counter overflow interrupts is provided for Intel P4 and P6, and AMD K7 and K8 processors.

last updated on:
June 20th, 2008, 8:34 GMT
developed by:
Mikael Pettersson
license type:
LGPL (GNU Lesser General Public License) 
ROOT \ Utilities
Download Button

In a hurry? Add it to your Download Basket!

user rating 15



Rate it!

Add your review!