aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/util/debug.h
diff options
context:
space:
mode:
Diffstat (limited to 'tools/perf/util/debug.h')
-rw-r--r--tools/perf/util/debug.h22
1 files changed, 22 insertions, 0 deletions
diff --git a/tools/perf/util/debug.h b/tools/perf/util/debug.h
index 443694c36b03..89fb6b0f7ab2 100644
--- a/tools/perf/util/debug.h
+++ b/tools/perf/util/debug.h
@@ -11,6 +11,24 @@
11extern int verbose; 11extern int verbose;
12extern bool quiet, dump_trace; 12extern 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, verbose, pr_fmt(fmt), ##__VA_ARGS__)
20#define pr_warning(fmt, ...) \
21 eprintf(0, verbose, pr_fmt(fmt), ##__VA_ARGS__)
22#define pr_info(fmt, ...) \
23 eprintf(0, verbose, pr_fmt(fmt), ##__VA_ARGS__)
24#define pr_debug(fmt, ...) \
25 eprintf(1, verbose, pr_fmt(fmt), ##__VA_ARGS__)
26#define pr_debugN(n, fmt, ...) \
27 eprintf(n, verbose, 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
14int dump_printf(const char *fmt, ...) __attribute__((format(printf, 1, 2))); 32int dump_printf(const char *fmt, ...) __attribute__((format(printf, 1, 2)));
15void trace_event(union perf_event *event); 33void trace_event(union perf_event *event);
16 34
@@ -19,4 +37,8 @@ int ui__warning(const char *format, ...) __attribute__((format(printf, 1, 2)));
19 37
20void pr_stat(const char *fmt, ...); 38void pr_stat(const char *fmt, ...);
21 39
40int eprintf(int level, int var, const char *fmt, ...) __attribute__((format(printf, 3, 4)));
41
42int perf_debug_option(const char *str);
43
22#endif /* __PERF_DEBUG_H */ 44#endif /* __PERF_DEBUG_H */