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

NAME         top

       pfm_strerror - return constant string describing error code

SYNOPSIS         top

       #include <perfmon/pfmlib.h>

       const char *pfm_strerror(int code);

DESCRIPTION         top

       This function returns a string which describes the libpfm error value
       in code. The string returned by the call is read-only.

       The function must only be used with libpfm calls documented to return
       specific error codes. The value -1 is not considered a specific error
       code.  Strings and pfm_pmu_t return values cannot be used with this
       function.  Typically NULL is returned in case of error for string
       values, and PFM_PMU_NONE is returned for pfm_pmu_t values.

       The function is also not designed to handle OS system call errors,
       i.e., errno values.

RETURN         top

       The function returns a pointer to the constant string describing the
       error code. The string is in English. If code is invalid then a
       default error message is returned.

ERRORS         top

       If the error code is invalid, then the function returns a pointer to
       a string which says "unknown error code".

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)