Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

Tree [0b9c2b] /
History



File Date Author Commit
debian 2012-08-01 Stephane Eranian Stephane Eranian [51a289] fix install target
docs 2012-06-06 Stephane Eranian Stephane Eranian [b621fa] add Intel Ivy Bridge support
examples 2012-06-28 Stephane Eranian Stephane Eranian [1ad1a8] fix some of the Coverity warnings
include 2012-03-02 Stephane Eranian Stephane Eranian [f3d940] add support for ARM A15 processor
lib 2012-08-04 Stephane Eranian Stephane Eranian [54d7e8] make L2_RQSTS umasks more consistent
perf_examples 2012-06-28 Stephane Eranian Stephane Eranian [1ad1a8] fix some of the Coverity warnings
python 2012-08-04 Stephane Eranian Stephane Eranian [0b9c2b] fix swig gcc compiles
tests 2012-03-02 Stephane Eranian Stephane Eranian [53a8a6] add ARM A15 validation tests
.gitignore 2010-07-15 Corey Ashford Corey Ashford [f799ff] Exclude more compilation artifacts from git's v...
COPYING 2011-02-28 Stephane Eranian Stephane Eranian [73e1ce] replace perf_event.h with a brand new version
Makefile 2012-07-31 Stephane Eranian Stephane Eranian [366bc3] add target to build static library and examples
README 2012-03-02 Stephane Eranian Stephane Eranian [f3d940] add support for ARM A15 processor
config.mk 2012-05-28 Stephane Eranian Stephane Eranian [4ecdf0] add support for compiling libpfm4 on Win32
libpfm.spec 2012-03-15 William Cohen William Cohen [c60178] update RPM spec file
rules.mk 2009-10-02 Stephane Eranian Stephane Eranian [4ba6cc] initial commit

Read Me

          ------------------------------------------------------------
                                    libpfm-4.x:
          a helper library to program the performance monitoring events
          ------------------------------------------------------------
 	  Copyright (c) 2009 Google, Inc
	                Contributed by Stephane Eranian <eranian@gmail.com>

 	  Copyright (c) 2001-2007 Hewlett-Packard Development Company, L.P.
	                Contributed by Stephane Eranian <eranian@hpl.hp.com>
	

This package provides a library, called libpfm4 which is used to develop
monitoring tools exploiting the performance monitoring events such as those
provided by the Performance Monitoring Unit (PMU) of modern processors.

This is a complete rewrite of libpfm3 and it is NOT backward compatible
with it.

Libpfm4 helps convert from an event name, expressed as a string, to 
the event encoding that is either the raw event as documented by HW vendor
or the OS-specific encoding. In the latter case, the library is able to
prepare the OS-specific data structures needed by the kernel to setup the
event.

The current libpfm4 provides support for the perf_events interface which was
introduced in Linux v2.6.31. Perfmon support is not present yet.

The library does not make any performance monitoring system calls. It is
portable and supports other operating system environments beyond Linux,
such as Mac OS X, and Windows.

The library supports many PMUs. The current version can handle:

	- For AMD X86:
		AMD64 K7, K8
		AMD64 Fam10h (Barcelona, Shanghai, Istanbul)
		AMD64 Fam11h (Turion)
		AMD64 Fam12h (Llano)
		AMD64 Fam14h (Bobcat)
		AMD64 Fam15h (Bulldozer)

	- For Intel X86: 
		Intel P6 (Pentium II, Pentium Pro, Pentium III, Pentium M)
		Intel Yonah (Core Duo/Core Solo),
		Intel Core (Merom, Penryn, Dunnington)
		Intel Atom
		Intel Nehalem, Westmere
		Intel Sandy Bridge
		Intel Ivy Bridge
		Intel architectural perfmon v1, v2, v3

	- For ARM:
		ARMV7 Cortex A8
		ARMV7 Cortex A9
		ARMV7 Cortex A15

	- For SPARC
		Ultra I, II
		Ultra III, IIIi, III+
		Ultra IV+
		Niagara I, Niagara II

	- For IBM
		Power 4
		Power 5
		Power 6
		Power 7
		PPC970
		Torrent

	- For MIPS
		Mips 74k

WHAT'S THERE
-------------
	- the library source code including support for all processors listed
	  above

	- a set of generic examples showing how to list and query events. They
	  are in examples.

	- a set of examples showing how the library can be used with the
	  perf_events interface. They are in perf_examples.

	- a set of library header files used to compile the library and
	  perf_examples

	- man pages for all the library entry points

	- Python bindings for the library

	- a SPEC file to build RPMs from the library

	- the Debian-style config file to build a .deb package from the library

INSTALLATION
------------
	- edit config.mk to :
		- update some of the configuration variables
		- select your compiler options

	- type make
	- type make install

 	- To compile and install the Python bindings, you need to go to the
	  python sub-directory and type make. Python may not be systematically
	  built.

	- to compile the library for another ABI (e.g. 32-bit x86 on a
	  64-bit x86) system, you can pass the ABI flag to the compiler as
	  follows (assuming you have the multilib version of gcc):
		$ make OPTIM="-m32 -O2"

	- to compile and install the library for 64-bit Power processors,
	  invoke make as follows:
		$ make BITMODE=64
		$ make BITMODE=64 install

PACKAGING
---------
	The library comes with the config files necessary to generate RPMs or
	Debian packages. The source code produces 3 packages:
	- libpfm : runtime library
	- libpfm-dev: development files (headers, manpages, static library)
	- libpfm-python: Python bindings for the library

	To generate the RPMs:
	$ rpmbuild -ba libpfm.spec

	To generate the Debian packages:
	$ debuild -i -us -uc -b

	You may need to install some extra packages to make Debian package
	generation possible.

REQUIREMENTS:
-------------
	- to run the programs in the perf_examples subdir, you MUST be using a
	  linux kernel with perf_events. That means v2.6.31 or later.

	- to compile the Python bindings, you need to have SWIG and the python
	  development packages installed

	- To compile on Windows, you need the MinGW and MSYS compiler environment
	  (see www.mingw.org). The environment needs to be augmented with the
	  mingw regex user contributed package (mingw-libgnurx-2.5.1.dev.tar.gz).

	- To compile on Mac OS X, you need to have gmake installed.

DOCUMENTATION
-------------
	- man pages for all entry points. It is recommended you start with: man libpfm
	- More information can be found on library web site:
			http://perfmon2.sf.net