diff options
Diffstat (limited to 'tools/perf')
-rw-r--r-- | tools/perf/util/debug.h | 2 | ||||
-rw-r--r-- | tools/perf/util/include/linux/kernel.h | 9 |
2 files changed, 6 insertions, 5 deletions
diff --git a/tools/perf/util/debug.h b/tools/perf/util/debug.h index c6c24c522dea..58720a181591 100644 --- a/tools/perf/util/debug.h +++ b/tools/perf/util/debug.h | |||
@@ -7,8 +7,6 @@ | |||
7 | extern int verbose; | 7 | extern int verbose; |
8 | extern int dump_trace; | 8 | extern int dump_trace; |
9 | 9 | ||
10 | int eprintf(int level, | ||
11 | const char *fmt, ...) __attribute__((format(printf, 2, 3))); | ||
12 | int dump_printf(const char *fmt, ...) __attribute__((format(printf, 1, 2))); | 10 | int dump_printf(const char *fmt, ...) __attribute__((format(printf, 1, 2))); |
13 | void trace_event(event_t *event); | 11 | void trace_event(event_t *event); |
14 | 12 | ||
diff --git a/tools/perf/util/include/linux/kernel.h b/tools/perf/util/include/linux/kernel.h index f2611655ab51..388ab1bfd114 100644 --- a/tools/perf/util/include/linux/kernel.h +++ b/tools/perf/util/include/linux/kernel.h | |||
@@ -85,16 +85,19 @@ simple_strtoul(const char *nptr, char **endptr, int base) | |||
85 | return strtoul(nptr, endptr, base); | 85 | return strtoul(nptr, endptr, base); |
86 | } | 86 | } |
87 | 87 | ||
88 | int eprintf(int level, | ||
89 | const char *fmt, ...) __attribute__((format(printf, 2, 3))); | ||
90 | |||
88 | #ifndef pr_fmt | 91 | #ifndef pr_fmt |
89 | #define pr_fmt(fmt) fmt | 92 | #define pr_fmt(fmt) fmt |
90 | #endif | 93 | #endif |
91 | 94 | ||
92 | #define pr_err(fmt, ...) \ | 95 | #define pr_err(fmt, ...) \ |
93 | do { fprintf(stderr, pr_fmt(fmt), ##__VA_ARGS__); } while (0) | 96 | eprintf(0, pr_fmt(fmt), ##__VA_ARGS__) |
94 | #define pr_warning(fmt, ...) \ | 97 | #define pr_warning(fmt, ...) \ |
95 | do { fprintf(stderr, pr_fmt(fmt), ##__VA_ARGS__); } while (0) | 98 | eprintf(0, pr_fmt(fmt), ##__VA_ARGS__) |
96 | #define pr_info(fmt, ...) \ | 99 | #define pr_info(fmt, ...) \ |
97 | do { fprintf(stderr, pr_fmt(fmt), ##__VA_ARGS__); } while (0) | 100 | eprintf(0, pr_fmt(fmt), ##__VA_ARGS__) |
98 | #define pr_debug(fmt, ...) \ | 101 | #define pr_debug(fmt, ...) \ |
99 | eprintf(1, pr_fmt(fmt), ##__VA_ARGS__) | 102 | eprintf(1, pr_fmt(fmt), ##__VA_ARGS__) |
100 | #define pr_debugN(n, fmt, ...) \ | 103 | #define pr_debugN(n, fmt, ...) \ |