Hi Stephane, I'm currently doing a "first cut" at porting Power to libpfm4 and I noticed one thing that's a little confusing about this new API.
The two terms "umask" and "attr" are used interchangeably, but without really mentioning that anywhere. I think the API should stick to using one word, either umask or attr. Personally, I prefer "attr" because it's a bit more general purpose. Is there some fine difference that I'm not perceiving between the two in libpfm4? Otherwise, so far it looks very clean and easy to work with. Regards, - Corey stephane eranian wrote: > 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. > > ------------------------------------------------------------------------------ > Come build with us! The BlackBerry® Developer Conference in SF, CA > is the only developer event you need to attend this year. Jumpstart your > developing skills, take BlackBerry mobile applications to market and stay > ahead of the curve. Join us from November 9-12, 2009. Register now! > http://p.sf.net/sfu/devconf > _______________________________________________ > perfmon2-devel mailing list > perfmon2-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/perfmon2-devel -- Regards, - Corey Corey Ashford Software Engineer IBM Linux Technology Center, Linux Toolchain Beaverton, OR 503-578-3507 cjash...@us.ibm.com ------------------------------------------------------------------------------ Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july _______________________________________________ perfmon2-devel mailing list perfmon2-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/perfmon2-devel