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" |
Namhyung Kim | 0985a94 | 2012-08-16 17:14:54 +0900 | [diff] [blame] | 7 | #include "../ui/helpline.h" |
Arnaldo Carvalho de Melo | 8f41146 | 2009-11-16 16:32:42 -0200 | [diff] [blame] | 8 | |
Frederic Weisbecker | cd84c2a | 2009-08-12 10:03:49 +0200 | [diff] [blame] | 9 | extern int verbose; |
Arnaldo Carvalho de Melo | b44308f | 2010-10-26 15:20:09 -0200 | [diff] [blame] | 10 | extern bool quiet, dump_trace; |
Frederic Weisbecker | cd84c2a | 2009-08-12 10:03:49 +0200 | [diff] [blame] | 11 | |
Frederic Weisbecker | 2cec19d | 2009-08-16 19:24:21 +0200 | [diff] [blame] | 12 | 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] | 13 | void trace_event(union perf_event *event); |
Arnaldo Carvalho de Melo | 567e547 | 2010-03-12 21:05:10 -0300 | [diff] [blame] | 14 | |
Arnaldo Carvalho de Melo | 5f4d3f8 | 2010-03-26 21:16:22 -0300 | [diff] [blame] | 15 | struct ui_progress; |
Namhyung Kim | ba47a14 | 2012-05-29 13:22:58 +0900 | [diff] [blame] | 16 | struct perf_error_ops; |
Arnaldo Carvalho de Melo | 5f4d3f8 | 2010-03-26 21:16:22 -0300 | [diff] [blame] | 17 | |
Namhyung Kim | f9f526e | 2012-09-28 18:32:03 +0900 | [diff] [blame] | 18 | #if defined(NEWT_SUPPORT) || defined(GTK2_SUPPORT) |
| 19 | |
| 20 | #include "../ui/progress.h" |
| 21 | int ui__error(const char *format, ...) __attribute__((format(printf, 1, 2))); |
| 22 | #include "../ui/util.h" |
| 23 | |
| 24 | #else |
| 25 | |
Irina Tirdea | 1d037ca | 2012-09-11 01:15:03 +0300 | [diff] [blame] | 26 | static inline void ui_progress__update(u64 curr __maybe_unused, |
| 27 | u64 total __maybe_unused, |
| 28 | const char *title __maybe_unused) {} |
Namhyung Kim | a5580f3 | 2012-11-13 22:30:34 +0900 | [diff] [blame] | 29 | static inline void ui_progress__finish(void) {} |
Arnaldo Carvalho de Melo | b8631e6 | 2011-10-26 08:02:55 -0200 | [diff] [blame] | 30 | |
| 31 | #define ui__error(format, arg...) ui__warning(format, ##arg) |
Namhyung Kim | ba47a14 | 2012-05-29 13:22:58 +0900 | [diff] [blame] | 32 | |
| 33 | static inline int |
Irina Tirdea | 1d037ca | 2012-09-11 01:15:03 +0300 | [diff] [blame] | 34 | perf_error__register(struct perf_error_ops *eops __maybe_unused) |
Namhyung Kim | ba47a14 | 2012-05-29 13:22:58 +0900 | [diff] [blame] | 35 | { |
| 36 | return 0; |
| 37 | } |
| 38 | |
| 39 | static inline int |
Irina Tirdea | 1d037ca | 2012-09-11 01:15:03 +0300 | [diff] [blame] | 40 | perf_error__unregister(struct perf_error_ops *eops __maybe_unused) |
Namhyung Kim | ba47a14 | 2012-05-29 13:22:58 +0900 | [diff] [blame] | 41 | { |
| 42 | return 0; |
| 43 | } |
| 44 | |
Namhyung Kim | f9f526e | 2012-09-28 18:32:03 +0900 | [diff] [blame] | 45 | #endif /* NEWT_SUPPORT || GTK2_SUPPORT */ |
John Kacur | 8b40f52 | 2009-09-24 18:02:18 +0200 | [diff] [blame] | 46 | |
Arnaldo Carvalho de Melo | 4610e41 | 2011-10-26 12:04:37 -0200 | [diff] [blame] | 47 | int ui__warning(const char *format, ...) __attribute__((format(printf, 1, 2))); |
| 48 | int ui__error_paranoid(void); |
Arnaldo Carvalho de Melo | 068ffaa | 2010-11-27 02:41:01 -0200 | [diff] [blame] | 49 | |
John Kacur | 8b40f52 | 2009-09-24 18:02:18 +0200 | [diff] [blame] | 50 | #endif /* __PERF_DEBUG_H */ |