Jump to content United States-English
HP.com Home Products and Services Support and Drivers Solutions How to Buy
» Contact HP

hp.com home


libpfm library FAQ

» 

HP Labs

» Research
» News and events
» Technical reports
» About HP Labs
» Careers @ HP Labs
» People
» Worldwide sites
» Downloads
Content starts here

The following list contains some of the most common questions about the libpfm library:

  1. Is libpfm-3.0 backward compatible with libpfm-2.0?

    No it is not. There are several important changes which require you to update code. However the core principles of the library remain the same.

  2. Can I libpfm-3.0 on 2.4 kernels (including RedHat and Suse)?

    No. This version of the library is meant to be used with the perfmon-2 kernel interface which is only present in the 2.6 kernel series.

  3. Libpfm-3.0 is supposedly decoupled from the kernel interface, how come it only works with 2.6 kernels?

    It is true that the core of the library, i.e., everything defined by the pfmlib_*.h header file is independent of the kernel interface. However, the library comes bundled with the kernel header files (perfmon.h perfmon_default_smpl.h) needed to develop monitoring tools. The package only contains the kernel header files for the 2.6 kernel series. Moreover, all the examples have been updated to the perfmon-2.x kernel interface. In theory, nothing prevents a developer from using the library with a perfmon-1.x kernel interface, as long as the right kernel perfmon interface headers are used.

  4. Can I use the library to develop a commercial application?

    The library uses a licence derived from the MIT licence as described here. This licence allows commercial use of the code. Please check the COPYRIGHT included with the source code for more details.

  5. Does the library call perfmonctl() system call?

    No it does not, the caller has to do this.

  6. Is it possible to remove the generic support from the library?

    Yes, simply edit the config.mk file and change the configuration for CONFIG_PFMLIB_GENERIC to:

    CONFIG_PFMLIB_GENERIC=n

    You must recompile the library to get rid of all the generic support. A similar change can be applied to the Itanium and Itanium 2 support, you this be useful.

  7. The pfm_dispatch_events() function does not program my Itanium/Itanium 2 specific feature?

    Make sure that:

    • you have connected the model specific configuration structure (either pfmlib_ita_param_t or pfmlib_ita2_param_t) to the generic pfmlib_param_t.
    • you have initialized the magic number field in the model specific structure correctly.
    • some features require the application to explicitely declare that it uses a particular feature. For instance, to use code range restrictions on Itanium you need have pfm_ita_irange.rr_used=1.


  8. On Itanium 2 the library refuses to setup my set of events?

    There are many restrictions on how events can be combined on Itanium 2. This is especially true for most of the L1 and L2 cache events. You need to combine your events in a different way possibly using multiple runs.



perfmon project links

» project home
» perfmon overview
» libpfm overview
» pfmon overview
» mailing list
» downloads
» bibliography
» presentations

libpfm links

» FAQ
» examples
» man pages
Printable version
Privacy statement Using this site means you accept its terms Feedback to HP Labs
© 2008 Hewlett-Packard Development Company, L.P.