Commit | Line | Data |
---|---|---|
cd84c2ac | 1 | /* For debugging general purposes */ |
8b40f521 JK |
2 | #ifndef __PERF_DEBUG_H |
3 | #define __PERF_DEBUG_H | |
cd84c2ac | 4 | |
c0555642 | 5 | #include <stdbool.h> |
8f41146a ACM |
6 | #include "event.h" |
7 | ||
cd84c2ac | 8 | extern int verbose; |
b44308f5 | 9 | extern bool quiet, dump_trace; |
cd84c2ac | 10 | |
2cec19d9 | 11 | int dump_printf(const char *fmt, ...) __attribute__((format(printf, 1, 2))); |
8115d60c | 12 | void trace_event(union perf_event *event); |
567e5479 | 13 | |
5f4d3f88 ACM |
14 | struct ui_progress; |
15 | ||
567e5479 | 16 | #ifdef NO_NEWT_SUPPORT |
1e6dd077 | 17 | static inline int ui_helpline__show_help(const char *format __used, va_list ap __used) |
567e5479 ACM |
18 | { |
19 | return 0; | |
20 | } | |
5f4d3f88 | 21 | |
ca59bcbc ACM |
22 | static inline void ui_progress__update(u64 curr __used, u64 total __used, |
23 | const char *title __used) {} | |
b8631e6e ACM |
24 | |
25 | #define ui__error(format, arg...) ui__warning(format, ##arg) | |
567e5479 | 26 | #else |
1e6dd077 ACM |
27 | extern char ui_helpline__last_msg[]; |
28 | int ui_helpline__show_help(const char *format, va_list ap); | |
34cea7f7 | 29 | #include "ui/progress.h" |
4610e413 | 30 | int ui__error(const char *format, ...) __attribute__((format(printf, 1, 2))); |
567e5479 | 31 | #endif |
8b40f521 | 32 | |
4610e413 ACM |
33 | int ui__warning(const char *format, ...) __attribute__((format(printf, 1, 2))); |
34 | int ui__error_paranoid(void); | |
068ffaa8 | 35 | |
8b40f521 | 36 | #endif /* __PERF_DEBUG_H */ |