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; |
Namhyung Kim | ba47a14 | 2012-05-29 13:22:58 +0900 | [diff] [blame] | 15 | struct perf_error_ops; |
Arnaldo Carvalho de Melo | 5f4d3f8 | 2010-03-26 21:16:22 -0300 | [diff] [blame] | 16 | |
Namhyung Kim | ba47a14 | 2012-05-29 13:22:58 +0900 | [diff] [blame] | 17 | #if defined(NO_NEWT_SUPPORT) && defined(NO_GTK2_SUPPORT) |
Arnaldo Carvalho de Melo | 1e6dd07 | 2010-08-10 15:58:50 -0300 | [diff] [blame] | 18 | 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] | 19 | { |
| 20 | return 0; |
| 21 | } |
Arnaldo Carvalho de Melo | 5f4d3f8 | 2010-03-26 21:16:22 -0300 | [diff] [blame] | 22 | |
Arnaldo Carvalho de Melo | ca59bcb | 2011-10-25 13:29:11 -0200 | [diff] [blame] | 23 | static inline void ui_progress__update(u64 curr __used, u64 total __used, |
| 24 | const char *title __used) {} |
Arnaldo Carvalho de Melo | b8631e6 | 2011-10-26 08:02:55 -0200 | [diff] [blame] | 25 | |
| 26 | #define ui__error(format, arg...) ui__warning(format, ##arg) |
Namhyung Kim | ba47a14 | 2012-05-29 13:22:58 +0900 | [diff] [blame] | 27 | |
| 28 | static inline int |
| 29 | perf_error__register(struct perf_error_ops *eops __used) |
| 30 | { |
| 31 | return 0; |
| 32 | } |
| 33 | |
| 34 | static inline int |
| 35 | perf_error__unregister(struct perf_error_ops *eops __used) |
| 36 | { |
| 37 | return 0; |
| 38 | } |
| 39 | |
| 40 | #else /* NO_NEWT_SUPPORT && NO_GTK2_SUPPORT */ |
| 41 | |
Arnaldo Carvalho de Melo | 1e6dd07 | 2010-08-10 15:58:50 -0300 | [diff] [blame] | 42 | extern char ui_helpline__last_msg[]; |
| 43 | int ui_helpline__show_help(const char *format, va_list ap); |
Namhyung Kim | aca7a94 | 2012-04-04 00:14:26 -0700 | [diff] [blame] | 44 | #include "../ui/progress.h" |
Arnaldo Carvalho de Melo | 4610e41 | 2011-10-26 12:04:37 -0200 | [diff] [blame] | 45 | int ui__error(const char *format, ...) __attribute__((format(printf, 1, 2))); |
Namhyung Kim | ba47a14 | 2012-05-29 13:22:58 +0900 | [diff] [blame] | 46 | #include "../ui/util.h" |
| 47 | |
| 48 | #endif /* NO_NEWT_SUPPORT && NO_GTK2_SUPPORT */ |
John Kacur | 8b40f52 | 2009-09-24 18:02:18 +0200 | [diff] [blame] | 49 | |
Arnaldo Carvalho de Melo | 4610e41 | 2011-10-26 12:04:37 -0200 | [diff] [blame] | 50 | int ui__warning(const char *format, ...) __attribute__((format(printf, 1, 2))); |
| 51 | int ui__error_paranoid(void); |
Arnaldo Carvalho de Melo | 068ffaa | 2010-11-27 02:41:01 -0200 | [diff] [blame] | 52 | |
John Kacur | 8b40f52 | 2009-09-24 18:02:18 +0200 | [diff] [blame] | 53 | #endif /* __PERF_DEBUG_H */ |