lkml.org 
[lkml]   [2009]   [Oct]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
Subjectlibpfm4 source code available
From
Hello,

I am happy to announce that the source code for the brand new version
of libpfm, libpfm4, is now available.

Libpfm4 is a helper library which can be used by tools programming
PMU other performance events on Linux and other operating systems.

The core service translates an event name into an event encoding. The
encoding depends on the event, underlying hardware, and may also depend
on the OS API. At its core, the library ignores any OS API. It provides a set
of entry points to list and encode events.

The library also provides API-specific calls to setup parameters to performance
API syscalls. In the initial release, for instance, it provides a
dedicated call to
prepare the structure needed by the perf_events API. The library does not
invoke the OS API.

Events are specified as strings. Unit masks and filters can be passed as well.
For instance, on Intel Core, one can say:

pfm_get_perf_event_attr("RS_UOPS_DISPATCHED:u:i:c=1", &attr);

Where:
u : monitors at the user level only
i : inverts the meaning counter-mask (from >= to <)
c : counter-mask, i.e., the number of cycles in which n or more occurrences
of the event are observed

Unit masks (sub-events) and filters depend on each event.

This version of the library is NOT backward compatible with libpfm3 and does
NOT yet provide support for perfmon2.x.

The library supports the following PMU models:
- all Intel X86 processors, including Intel Nehalem uncore PMU
- AMD64 processors from K7 to Fam11h

Warning: there is support for more processors than what is currently supported
by perf_events, e.g., Intel Nehalem uncore PMU, Intel Core Duo.

Support for other processors (as offered by libpfm3) will be added gradually but
will depend on the OS API providing access as well.

Furthermore, the library provides access to perf_events generic software and
hardware events and also trace points.

The library comes with a set of generic examples demonstrating the listing and
generic encoding services. But it also comes with a bunch of simple perf_event
examples showing common monitoring scenarios.

The library comes with man pages for each entry point. The man pages are also
available on the perfmon2 web site:

htp://perfmon2.sf.net

To get the source code, you need to use GIT. You can clone the repository with:

git clone git://perfmon2.git.sourceforge.net/gitroot/perfmon2/libpfm4


Thanks.


\
 
 \ /
  Last update: 2009-10-02 17:29    [W:0.062 / U:0.884 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site