diff options
author | Jiri Olsa <jolsa@kernel.org> | 2014-07-14 17:46:48 -0400 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2014-07-17 11:58:39 -0400 |
commit | 84f5d36f486609277801e827241396334185d11c (patch) | |
tree | 20cf8bfbd679131274f090020c2c6c8495a5b2a4 /tools/perf/util/debug.h | |
parent | acebd408bef17169fbf79079b96f0264b535916c (diff) |
perf tools: Move pr_* debug macros into debug object
Moving pr_* debug macros to have it with in same object as debug
variables, becase we will change them to use verbose variable in next
patch.
Signed-off-by: Jiri Olsa <jolsa@kernel.org>
Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Link: http://lkml.kernel.org/r/1405374411-29012-3-git-send-email-jolsa@kernel.org
[ Add missing debug.h include in python scripting glue and in the libdw unwind lib ]
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/util/debug.h')
-rw-r--r-- | tools/perf/util/debug.h | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/tools/perf/util/debug.h b/tools/perf/util/debug.h index 443694c36b03..8a8ceb3ccde9 100644 --- a/tools/perf/util/debug.h +++ b/tools/perf/util/debug.h | |||
@@ -11,6 +11,24 @@ | |||
11 | extern int verbose; | 11 | extern int verbose; |
12 | extern bool quiet, dump_trace; | 12 | extern bool quiet, dump_trace; |
13 | 13 | ||
14 | #ifndef pr_fmt | ||
15 | #define pr_fmt(fmt) fmt | ||
16 | #endif | ||
17 | |||
18 | #define pr_err(fmt, ...) \ | ||
19 | eprintf(0, pr_fmt(fmt), ##__VA_ARGS__) | ||
20 | #define pr_warning(fmt, ...) \ | ||
21 | eprintf(0, pr_fmt(fmt), ##__VA_ARGS__) | ||
22 | #define pr_info(fmt, ...) \ | ||
23 | eprintf(0, pr_fmt(fmt), ##__VA_ARGS__) | ||
24 | #define pr_debug(fmt, ...) \ | ||
25 | eprintf(1, pr_fmt(fmt), ##__VA_ARGS__) | ||
26 | #define pr_debugN(n, fmt, ...) \ | ||
27 | eprintf(n, pr_fmt(fmt), ##__VA_ARGS__) | ||
28 | #define pr_debug2(fmt, ...) pr_debugN(2, pr_fmt(fmt), ##__VA_ARGS__) | ||
29 | #define pr_debug3(fmt, ...) pr_debugN(3, pr_fmt(fmt), ##__VA_ARGS__) | ||
30 | #define pr_debug4(fmt, ...) pr_debugN(4, pr_fmt(fmt), ##__VA_ARGS__) | ||
31 | |||
14 | int dump_printf(const char *fmt, ...) __attribute__((format(printf, 1, 2))); | 32 | int dump_printf(const char *fmt, ...) __attribute__((format(printf, 1, 2))); |
15 | void trace_event(union perf_event *event); | 33 | void trace_event(union perf_event *event); |
16 | 34 | ||
@@ -19,4 +37,6 @@ int ui__warning(const char *format, ...) __attribute__((format(printf, 1, 2))); | |||
19 | 37 | ||
20 | void pr_stat(const char *fmt, ...); | 38 | void pr_stat(const char *fmt, ...); |
21 | 39 | ||
40 | int eprintf(int level, const char *fmt, ...) __attribute__((format(printf, 2, 3))); | ||
41 | |||
22 | #endif /* __PERF_DEBUG_H */ | 42 | #endif /* __PERF_DEBUG_H */ |