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 | 6 | #include "event.h" |
0985a948 | 7 | #include "../ui/helpline.h" |
8f41146a | 8 | |
cd84c2ac | 9 | extern int verbose; |
b44308f5 | 10 | extern bool quiet, dump_trace; |
cd84c2ac | 11 | |
2cec19d9 | 12 | int dump_printf(const char *fmt, ...) __attribute__((format(printf, 1, 2))); |
8115d60c | 13 | void trace_event(union perf_event *event); |
567e5479 | 14 | |
5f4d3f88 | 15 | struct ui_progress; |
ba47a142 | 16 | struct perf_error_ops; |
5f4d3f88 | 17 | |
ba47a142 | 18 | #if defined(NO_NEWT_SUPPORT) && defined(NO_GTK2_SUPPORT) |
1d037ca1 IT |
19 | static inline void ui_progress__update(u64 curr __maybe_unused, |
20 | u64 total __maybe_unused, | |
21 | const char *title __maybe_unused) {} | |
b8631e6e ACM |
22 | |
23 | #define ui__error(format, arg...) ui__warning(format, ##arg) | |
ba47a142 NK |
24 | |
25 | static inline int | |
1d037ca1 | 26 | perf_error__register(struct perf_error_ops *eops __maybe_unused) |
ba47a142 NK |
27 | { |
28 | return 0; | |
29 | } | |
30 | ||
31 | static inline int | |
1d037ca1 | 32 | perf_error__unregister(struct perf_error_ops *eops __maybe_unused) |
ba47a142 NK |
33 | { |
34 | return 0; | |
35 | } | |
36 | ||
37 | #else /* NO_NEWT_SUPPORT && NO_GTK2_SUPPORT */ | |
38 | ||
aca7a94d | 39 | #include "../ui/progress.h" |
4610e413 | 40 | int ui__error(const char *format, ...) __attribute__((format(printf, 1, 2))); |
ba47a142 NK |
41 | #include "../ui/util.h" |
42 | ||
43 | #endif /* NO_NEWT_SUPPORT && NO_GTK2_SUPPORT */ | |
8b40f521 | 44 | |
4610e413 ACM |
45 | int ui__warning(const char *format, ...) __attribute__((format(printf, 1, 2))); |
46 | int ui__error_paranoid(void); | |
068ffaa8 | 47 | |
8b40f521 | 48 | #endif /* __PERF_DEBUG_H */ |