logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

pfm_initialize - initialize library

Author

       Stephane Eranian <eranian@gmail.com>

                                                 September, 2009                                       LIBPFM(3)

Description

       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.   This  is  notareentrantfunction. Only one thread at a time can call the function

Errors

PFMLIB_ERR_NOTSUPP
              No PMU was activated.

Name

       pfm_initialize - initialize library

Return

       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.

Synopsis

#include<perfmon/pfmlib.h>intpfm_initialize(void);

See Also