LIBPFM(3)                 Linux Programmer's Manual                LIBPFM(3)

NAME         top

       pfm_initialize - initialize library

SYNOPSIS         top

       #include <perfmon/pfmlib.h>

       int pfm_initialize(void);

DESCRIPTION         top

       This is the first function that a program must call otherwise the
       library will not operate.  This function probes the underlying
       hardware looking for valid PMU event tables to activate.  Multiple
       distinct PMU tables may be activated at the same time.

       The function must be called only once. If the function is called more
       than once, it does not execute the initialization multiple times, it
       simply returns the same value as for the first call.

RETURN         top

       The function returns whether or not it was successful, i.e., at least
       one PMU was activated. A return value of PFMLIB_SUCCESS indicates
       success, otherwise the value is an error code.

ERRORS         top

              No PMU was activated.

AUTHOR         top

       Stephane Eranian <>

COLOPHON         top

       This page is part of the perfmon2 (a performance monitoring library)
       project.  Information about the project can be found at 
       ⟨⟩.  If you have a bug report for this
       manual page, send it to  This
       page was obtained from the project's upstream Git repository 
       ⟨git://⟩ on 2017-03-13.  If you dis‐
       cover any rendering problems in this HTML version of the page, or you
       believe there is a better or more up-to-date source for the page, or
       you have corrections or improvements to the information in this
       COLOPHON (which is not part of the original manual page), send a mail

                               September, 2009                     LIBPFM(3)