diff options
author | Jiri Olsa <jolsa@kernel.org> | 2019-10-17 12:59:18 +0200 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2019-10-19 20:35:01 +0200 |
commit | dcc6854215f115efcbd79368bc07099c41de0b6c (patch) | |
tree | aedbcb4a6c21e2970c9cc173544adf692e34ee26 /tools/perf/lib/internal.h | |
parent | libperf: Do not export perf_evsel__init()/perf_evlist__init() (diff) | |
download | linux-dcc6854215f115efcbd79368bc07099c41de0b6c.tar.xz linux-dcc6854215f115efcbd79368bc07099c41de0b6c.zip |
libperf: Add pr_err() macro
And missing include for "perf/core.h" header, which provides LIBPERF_*
debug levels and add missing pr_err() support.
Signed-off-by: Jiri Olsa <jolsa@kernel.org>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Alexey Budankov <alexey.budankov@linux.intel.com>
Cc: Andi Kleen <ak@linux.intel.com>
Cc: Jin Yao <yao.jin@linux.intel.com>
Cc: Michael Petlan <mpetlan@redhat.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stephane Eranian <eranian@google.com>
Link: http://lore.kernel.org/lkml/20191017105918.20873-11-jolsa@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/lib/internal.h')
-rw-r--r-- | tools/perf/lib/internal.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/tools/perf/lib/internal.h b/tools/perf/lib/internal.h index 37db745e1502..2c27e158de6b 100644 --- a/tools/perf/lib/internal.h +++ b/tools/perf/lib/internal.h @@ -2,6 +2,8 @@ #ifndef __LIBPERF_INTERNAL_H #define __LIBPERF_INTERNAL_H +#include <perf/core.h> + void libperf_print(enum libperf_print_level level, const char *format, ...) __attribute__((format(printf, 2, 3))); @@ -11,6 +13,7 @@ do { \ libperf_print(level, "libperf: " fmt, ##__VA_ARGS__); \ } while (0) +#define pr_err(fmt, ...) __pr(LIBPERF_ERR, fmt, ##__VA_ARGS__) #define pr_warning(fmt, ...) __pr(LIBPERF_WARN, fmt, ##__VA_ARGS__) #define pr_info(fmt, ...) __pr(LIBPERF_INFO, fmt, ##__VA_ARGS__) #define pr_debug(fmt, ...) __pr(LIBPERF_DEBUG, fmt, ##__VA_ARGS__) |