diff options
Diffstat (limited to 'tools/perf/util/debug.h')
-rw-r--r-- | tools/perf/util/debug.h | 30 |
1 files changed, 27 insertions, 3 deletions
diff --git a/tools/perf/util/debug.h b/tools/perf/util/debug.h index c6c24c522dea..047ac3324ebe 100644 --- a/tools/perf/util/debug.h +++ b/tools/perf/util/debug.h | |||
@@ -2,14 +2,38 @@ | |||
2 | #ifndef __PERF_DEBUG_H | 2 | #ifndef __PERF_DEBUG_H |
3 | #define __PERF_DEBUG_H | 3 | #define __PERF_DEBUG_H |
4 | 4 | ||
5 | #include <stdbool.h> | ||
5 | #include "event.h" | 6 | #include "event.h" |
6 | 7 | ||
7 | extern int verbose; | 8 | extern int verbose; |
8 | extern int dump_trace; | 9 | extern bool dump_trace; |
9 | 10 | ||
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))); | 11 | int dump_printf(const char *fmt, ...) __attribute__((format(printf, 1, 2))); |
13 | void trace_event(event_t *event); | 12 | void trace_event(event_t *event); |
14 | 13 | ||
14 | struct ui_progress; | ||
15 | |||
16 | #ifdef NO_NEWT_SUPPORT | ||
17 | static inline int browser__show_help(const char *format __used, va_list ap __used) | ||
18 | { | ||
19 | return 0; | ||
20 | } | ||
21 | |||
22 | static inline struct ui_progress *ui_progress__new(const char *title __used, | ||
23 | u64 total __used) | ||
24 | { | ||
25 | return (struct ui_progress *)1; | ||
26 | } | ||
27 | |||
28 | static inline void ui_progress__update(struct ui_progress *self __used, | ||
29 | u64 curr __used) {} | ||
30 | |||
31 | static inline void ui_progress__delete(struct ui_progress *self __used) {} | ||
32 | #else | ||
33 | int browser__show_help(const char *format, va_list ap); | ||
34 | struct ui_progress *ui_progress__new(const char *title, u64 total); | ||
35 | void ui_progress__update(struct ui_progress *self, u64 curr); | ||
36 | void ui_progress__delete(struct ui_progress *self); | ||
37 | #endif | ||
38 | |||
15 | #endif /* __PERF_DEBUG_H */ | 39 | #endif /* __PERF_DEBUG_H */ |