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_strerror - return constant string describing error code

Author

       Stephane Eranian <eranian@gmail.com>

                                                 September, 2009                                       LIBPFM(3)

Description

       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.

Errors

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

Name

       pfm_strerror - return constant string describing error code

Return

       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.

Synopsis

#include<perfmon/pfmlib.h>constchar*pfm_strerror(intcode);

See Also