1LIBPFM(3) Linux Programmer's Manual LIBPFM(3)
2
3
4
6 pfm_strerror - return constant string describing error code
7
9 #include <perfmon/pfmlib.h>
10
11 const char *pfm_strerror(int code);
12
13
15 This function returns a string which describes the libpfm error value
16 in code. The string returned by the call is read-only.
17
18 The function must only be used with libpfm calls documented to return
19 specific error codes. The value -1 is not considered a specific error
20 code. Strings and pfm_pmu_t return values cannot be used with this
21 function. Typically NULL is returned in case of error for string val‐
22 ues, and PFM_PMU_NONE is returned for pfm_pmu_t values.
23
24 The function is also not designed to handle OS system call errors,
25 i.e., errno values.
26
27
29 The function returns a pointer to the constant string describing the
30 error code. The string is in English. If code is invalid then a default
31 error message is returned.
32
34 If the error code is invalid, then the function returns a pointer to a
35 string which says "unknown error code".
36
38 Stephane Eranian <eranian@gmail.com>
39
40 September, 2009 LIBPFM(3)