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; |
Arnaldo Carvalho de Melo | b44308f | 2010-10-26 15:20:09 -0200 | [diff] [blame] | 9 | extern bool quiet, 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))); |
Arnaldo Carvalho de Melo | 8115d60 | 2011-01-29 14:01:45 -0200 | [diff] [blame^] | 12 | void trace_event(union perf_event *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 |
Arnaldo Carvalho de Melo | 1e6dd07 | 2010-08-10 15:58:50 -0300 | [diff] [blame] | 17 | static inline int ui_helpline__show_help(const char *format __used, va_list ap __used) |
Arnaldo Carvalho de Melo | 567e547 | 2010-03-12 21:05:10 -0300 | [diff] [blame] | 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 | 1e6dd07 | 2010-08-10 15:58:50 -0300 | [diff] [blame] | 33 | extern char ui_helpline__last_msg[]; |
| 34 | int ui_helpline__show_help(const char *format, va_list ap); |
Arnaldo Carvalho de Melo | 34cea7f | 2010-08-08 19:56:47 -0300 | [diff] [blame] | 35 | #include "ui/progress.h" |
Arnaldo Carvalho de Melo | 567e547 | 2010-03-12 21:05:10 -0300 | [diff] [blame] | 36 | #endif |
John Kacur | 8b40f52 | 2009-09-24 18:02:18 +0200 | [diff] [blame] | 37 | |
Arnaldo Carvalho de Melo | 068ffaa | 2010-11-27 02:41:01 -0200 | [diff] [blame] | 38 | void ui__warning(const char *format, ...) __attribute__((format(printf, 1, 2))); |
| 39 | |
John Kacur | 8b40f52 | 2009-09-24 18:02:18 +0200 | [diff] [blame] | 40 | #endif /* __PERF_DEBUG_H */ |