aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/util/debug.h
diff options
context:
space:
mode:
Diffstat (limited to 'tools/perf/util/debug.h')
-rw-r--r--tools/perf/util/debug.h33
1 files changed, 2 insertions, 31 deletions
diff --git a/tools/perf/util/debug.h b/tools/perf/util/debug.h
index dec98750b484..efbd98805ad0 100644
--- a/tools/perf/util/debug.h
+++ b/tools/perf/util/debug.h
@@ -5,6 +5,8 @@
5#include <stdbool.h> 5#include <stdbool.h>
6#include "event.h" 6#include "event.h"
7#include "../ui/helpline.h" 7#include "../ui/helpline.h"
8#include "../ui/progress.h"
9#include "../ui/util.h"
8 10
9extern int verbose; 11extern int verbose;
10extern bool quiet, dump_trace; 12extern bool quiet, dump_trace;
@@ -12,38 +14,7 @@ extern bool quiet, dump_trace;
12int dump_printf(const char *fmt, ...) __attribute__((format(printf, 1, 2))); 14int dump_printf(const char *fmt, ...) __attribute__((format(printf, 1, 2)));
13void trace_event(union perf_event *event); 15void trace_event(union perf_event *event);
14 16
15struct ui_progress;
16struct perf_error_ops;
17
18#if defined(NEWT_SUPPORT) || defined(GTK2_SUPPORT)
19
20#include "../ui/progress.h"
21int ui__error(const char *format, ...) __attribute__((format(printf, 1, 2))); 17int ui__error(const char *format, ...) __attribute__((format(printf, 1, 2)));
22#include "../ui/util.h"
23
24#else
25
26static inline void ui_progress__update(u64 curr __maybe_unused,
27 u64 total __maybe_unused,
28 const char *title __maybe_unused) {}
29
30#define ui__error(format, arg...) ui__warning(format, ##arg)
31
32static inline int
33perf_error__register(struct perf_error_ops *eops __maybe_unused)
34{
35 return 0;
36}
37
38static inline int
39perf_error__unregister(struct perf_error_ops *eops __maybe_unused)
40{
41 return 0;
42}
43
44#endif /* NEWT_SUPPORT || GTK2_SUPPORT */
45
46int ui__warning(const char *format, ...) __attribute__((format(printf, 1, 2))); 18int ui__warning(const char *format, ...) __attribute__((format(printf, 1, 2)));
47int ui__error_paranoid(void);
48 19
49#endif /* __PERF_DEBUG_H */ 20#endif /* __PERF_DEBUG_H */