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 | |
Arnaldo Carvalho de Melo | ca59bcb | 2011-10-25 13:29:11 -0200 | [diff] [blame] | 22 | static inline void ui_progress__update(u64 curr __used, u64 total __used, |
| 23 | const char *title __used) {} |
Arnaldo Carvalho de Melo | b8631e6 | 2011-10-26 08:02:55 -0200 | [diff] [blame] | 24 | |
| 25 | #define ui__error(format, arg...) ui__warning(format, ##arg) |
Arnaldo Carvalho de Melo | 567e547 | 2010-03-12 21:05:10 -0300 | [diff] [blame] | 26 | #else |
Arnaldo Carvalho de Melo | 1e6dd07 | 2010-08-10 15:58:50 -0300 | [diff] [blame] | 27 | extern char ui_helpline__last_msg[]; |
| 28 | 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] | 29 | #include "ui/progress.h" |
Arnaldo Carvalho de Melo | 4610e41 | 2011-10-26 12:04:37 -0200 | [diff] [blame] | 30 | int ui__error(const char *format, ...) __attribute__((format(printf, 1, 2))); |
Arnaldo Carvalho de Melo | 567e547 | 2010-03-12 21:05:10 -0300 | [diff] [blame] | 31 | #endif |
John Kacur | 8b40f52 | 2009-09-24 18:02:18 +0200 | [diff] [blame] | 32 | |
Arnaldo Carvalho de Melo | 4610e41 | 2011-10-26 12:04:37 -0200 | [diff] [blame] | 33 | int ui__warning(const char *format, ...) __attribute__((format(printf, 1, 2))); |
| 34 | int ui__error_paranoid(void); |
Arnaldo Carvalho de Melo | 068ffaa | 2010-11-27 02:41:01 -0200 | [diff] [blame] | 35 | |
John Kacur | 8b40f52 | 2009-09-24 18:02:18 +0200 | [diff] [blame] | 36 | #endif /* __PERF_DEBUG_H */ |