Frederic Weisbecker | cd84c2a | 2009-08-12 10:03:49 +0200 | [diff] [blame] | 1 | /* For debugging general purposes */ |
John Kacur | 8b40f52 | 2009-09-24 18:02:18 +0200 | [diff] [blame] | 2 | #ifndef __PERF_DEBUG_H |
| 3 | #define __PERF_DEBUG_H |
Frederic Weisbecker | cd84c2a | 2009-08-12 10:03:49 +0200 | [diff] [blame] | 4 | |
Ian Munsie | c055564 | 2010-04-13 18:37:33 +1000 | [diff] [blame] | 5 | #include <stdbool.h> |
Arnaldo Carvalho de Melo | 8f41146 | 2009-11-16 16:32:42 -0200 | [diff] [blame] | 6 | #include "event.h" |
| 7 | |
Frederic Weisbecker | cd84c2a | 2009-08-12 10:03:49 +0200 | [diff] [blame] | 8 | extern int verbose; |
Ian Munsie | c055564 | 2010-04-13 18:37:33 +1000 | [diff] [blame] | 9 | extern bool dump_trace; |
Frederic Weisbecker | cd84c2a | 2009-08-12 10:03:49 +0200 | [diff] [blame] | 10 | |
Frederic Weisbecker | 2cec19d | 2009-08-16 19:24:21 +0200 | [diff] [blame] | 11 | int dump_printf(const char *fmt, ...) __attribute__((format(printf, 1, 2))); |
Frederic Weisbecker | 8f28827 | 2009-08-16 22:05:48 +0200 | [diff] [blame] | 12 | void trace_event(event_t *event); |
Arnaldo Carvalho de Melo | 567e547 | 2010-03-12 21:05:10 -0300 | [diff] [blame] | 13 | |
Arnaldo Carvalho de Melo | 5f4d3f8 | 2010-03-26 21:16:22 -0300 | [diff] [blame] | 14 | struct ui_progress; |
| 15 | |
Arnaldo Carvalho de Melo | 567e547 | 2010-03-12 21:05:10 -0300 | [diff] [blame] | 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 | } |
Arnaldo Carvalho de Melo | 5f4d3f8 | 2010-03-26 21:16:22 -0300 | [diff] [blame] | 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) {} |
Arnaldo Carvalho de Melo | 567e547 | 2010-03-12 21:05:10 -0300 | [diff] [blame] | 32 | #else |
Arnaldo Carvalho de Melo | f9224c5 | 2010-03-11 20:12:44 -0300 | [diff] [blame] | 33 | int browser__show_help(const char *format, va_list ap); |
Arnaldo Carvalho de Melo | 5f4d3f8 | 2010-03-26 21:16:22 -0300 | [diff] [blame] | 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); |
Arnaldo Carvalho de Melo | 567e547 | 2010-03-12 21:05:10 -0300 | [diff] [blame] | 37 | #endif |
John Kacur | 8b40f52 | 2009-09-24 18:02:18 +0200 | [diff] [blame] | 38 | |
| 39 | #endif /* __PERF_DEBUG_H */ |