[LWN Logo]

Date:	Mon, 31 May 1999 01:50:52 +0200 (MET DST)
From:	Mikael Pettersson <mikpe@csd.uu.se>
To:	linux-kernel@vger.rutgers.edu
Subject: Announce: x86 performance-monitoring counters support

[ This is taken from the README in the distribution. In the
future, I'll make shorter announcements when major updates
have been made. --Mikael]


x86 Performance-Monitoring Counters
===================================

Overview
--------
This package adds support to the Linux kernel for using the
Performance-Monitoring Counters (PMCs) found in modern x86-class
processors. (Intel and Cyrix are supported.)

PMCs are "event counters" capable of recording any of a large
number of performance-related events during execution.
These events typically include instructions executed, cache
misses, TLB misses, stalls, and various events specific to
the microarchitecture of the processor being used.

PMCs are primarily used by compiler writers, runtime system
developers, and kernel developers, to identify code sections
exhibiting low-level performance problems, and to validate
code changes intended to improve performance.

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 40 or 48-bit PMCs.

[Richard Gooch' Model-Specific Registers patch includes a
driver for accessing the PMCs. However, his driver is not
integrated with Linux' process management and does not support
"virtual-mode" PMCs. Since I really need virtual PMCs, I wrote
this package instead.]

Status
------
The current release is version 0.1 for Linux 2.3.3.
The code has been tested on Pentium MMX and Pentium II machines.

These are the currently known main limitations:
- Global-mode counters, used when profiling the kernel itself,
  are not yet implemented.
- The driver does not attempt to hide any processor-specific
  details from the user. The user-level library does not yet
  implement any abstractions, so the user has to know _all_
  processor-specific details related to the performance-monitoring
  registers and the model-specific registers used to control them.
- User access to the driver is via ioctl() on /dev/perfctr.
  Linux/sparc64 has sys_perfctr(), perhaps Linux/i386 should too?

Availability
------------
The latest version of this package can be downloaded from
http://www.csd.uu.se/~mikpe/linux/

/ Mikael Pettersson

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/