Blame src/perfctr-2.6.x/README

Packit 577717
$Id: README,v 1.46.2.7 2010/01/30 11:50:30 mikpe Exp $
Packit 577717
Packit 577717
	   Linux Performance-Monitoring Counters Driver
Packit 577717
		Mikael Pettersson <mikpe@it.uu.se>
Packit 577717
========================================================================
Packit 577717
Packit 577717
Packit 577717
Overview
Packit 577717
--------
Packit 577717
This package adds support to the Linux kernel (2.6.0 or newer)
Packit 577717
for using the Performance-Monitoring Counters (PMCs) found in
Packit 577717
many modern processors. Supported processors are:
Packit 577717
- All Intel x86 family 5, 6, and 15 processors, i.e., Pentium,
Packit 577717
  Pentium MMX, Pentium Pro, Pentium II, Pentium III, Pentium M,
Packit 577717
  Pentium 4, Core, Core 2, Atom, and Core i7, including Celeron and Xeon versions.
Packit 577717
- The AMD K7, K8, Family 10h, and Family 11h processor families.
Packit 577717
- Cyrix 6x86MX, MII, and III.
Packit 577717
- VIA C3 (Cyrix III).
Packit 577717
- Centaur WinChip C6/2/3.
Packit 577717
- PowerPC 604, 7xx, and 74xx processors.
Packit 577717
- Intel XScale 1 and 2 processors (ARM).
Packit 577717
Packit 577717
PMCs are "event counters" capable of recording any of a large
Packit 577717
number of performance-related events during execution.
Packit 577717
These events typically include instructions executed, cache
Packit 577717
misses, TLB misses, stalls, and other events specific to
Packit 577717
the microarchitecture of the processor being used.
Packit 577717
Packit 577717
PMCs are primarily used to identify low-level performance problems,
Packit 577717
and to validate code changes intended to improve performance.
Packit 577717
Packit 577717
Limited support is available for generic x86 processors with
Packit 577717
a Time-Stamp Counter but no PMCs, such as the AMD K6 family.
Packit 577717
For these processors, only TSC-based cycle-count measurements
Packit 577717
are possible. However, all high-level facilities implemented
Packit 577717
by the driver are still available.
Packit 577717
Packit 577717
Packit 577717
Features
Packit 577717
--------
Packit 577717
Each Linux process has its own set of "virtual" PMCs. That is,
Packit 577717
to a process the PMCs appear to be private and unrelated to the
Packit 577717
activities of other processes in the system. The virtual PMCs
Packit 577717
have 64-bit precision, even though current processors only
Packit 577717
implement 32, 40, or 48-bit PMCs. Each process also has a virtual
Packit 577717
Time-Stamp Counter (TSC). On most machines, the virtual PMCs can
Packit 577717
be sampled entirely in user-space without incurring the overhead
Packit 577717
of a system call.
Packit 577717
Packit 577717
A process accesses its virtual PMCs by opening /dev/perfctr
Packit 577717
and issuing system calls on the resulting file descriptor. A
Packit 577717
user-space library is included which provides a more high-level
Packit 577717
interface.
Packit 577717
Packit 577717
The driver also supports global-mode or system-wide PMCs.
Packit 577717
In this mode, each PMC on each processor can be controlled
Packit 577717
and read. The PMCs and TSC on active processors are sampled
Packit 577717
periodically and the accumulated sums have 64-bit precision.
Packit 577717
Global-mode PMCs are accessed via the /dev/perfctr device file;
Packit 577717
the user-space library provides a more high-level interface.
Packit 577717
Packit 577717
The user-space library is accompanied by several example programs
Packit 577717
that illustrate how the driver and the library can be used.
Packit 577717
Packit 577717
Support for performance-counter overflow interrupts is provided
Packit 577717
where such support exists in the processors.
Packit 577717
Packit 577717
Packit 577717
Limitations
Packit 577717
-----------
Packit 577717
- Kernels older than 2.6.0 are not supported.
Packit 577717
- The performance counter interrupt facility on x86 requires SMP or
Packit 577717
  uniprocessor APIC support. In the latter case, the BIOS must be
Packit 577717
  reasonably non-buggy. Unfortunately, this is often not the case.
Packit 577717
- Almost no documentation. "Use the source, Luke."
Packit 577717
- Neither the kernel driver nor the sample user-space library
Packit 577717
  attempt to hide any processor-specific details from the user.
Packit 577717
- This package makes it possible to compute aggregate event and
Packit 577717
  cycle counts for sections of code. Since many x86-type processors
Packit 577717
  use out-of-order execution, it is impossible to attribute exact
Packit 577717
  event or cycle counts to individual instructions.
Packit 577717
  See the "Continuous Profiling" and "ProfileMe" papers at Compaq's
Packit 577717
  DCPI web site for more information on this issue. (The URL is
Packit 577717
  listed in the OTHERS file.)
Packit 577717
- Centaur WinChip C6/2/3 support requires that the TSC is disabled.
Packit 577717
  See linux/drivers/perfctr/x86.c for further information.
Packit 577717
Packit 577717
Packit 577717
Availability
Packit 577717
------------
Packit 577717
This and future versions of this package can be downloaded from
Packit 577717
<http://user.it.uu.se/~mikpe/linux/perfctr/>.
Packit 577717
Packit 577717
The perfctr-devel mailing list is an open forum for driver update
Packit 577717
announcements and general discussions about the perfctr driver
Packit 577717
and its usage. To subscribe to perfctr-devel, visit
Packit 577717
<http://lists.sourceforge.net/lists/listinfo/perfctr-devel>.
Packit 577717
Packit 577717
Packit 577717
Licensing
Packit 577717
---------
Packit 577717
Copyright (C) 1999-2010  Mikael Pettersson <mikpe@it.uu.se>
Packit 577717
Packit 577717
This library is free software; you can redistribute it and/or
Packit 577717
modify it under the terms of the GNU Lesser General Public
Packit 577717
License as published by the Free Software Foundation; either
Packit 577717
version 2.1 of the License, or (at your option) any later version.
Packit 577717
Packit 577717
This library is distributed in the hope that it will be useful,
Packit 577717
but WITHOUT ANY WARRANTY; without even the implied warranty of
Packit 577717
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
Packit 577717
Lesser General Public License for more details.
Packit 577717
Packit 577717
You should have received a copy of the GNU Lesser General Public
Packit 577717
License along with this library; if not, write to the Free Software
Packit 577717
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA