]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/blame - tools/perf/util/debug.h
perf tools: Stop using a global trace events description list
[mirror_ubuntu-zesty-kernel.git] / tools / perf / util / debug.h
CommitLineData
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 8extern int verbose;
b44308f5 9extern bool quiet, dump_trace;
cd84c2ac 10
2cec19d9 11int dump_printf(const char *fmt, ...) __attribute__((format(printf, 1, 2)));
8115d60c 12void trace_event(union perf_event *event);
567e5479 13
5f4d3f88 14struct ui_progress;
ba47a142 15struct perf_error_ops;
5f4d3f88 16
ba47a142 17#if defined(NO_NEWT_SUPPORT) && defined(NO_GTK2_SUPPORT)
1e6dd077 18static inline int ui_helpline__show_help(const char *format __used, va_list ap __used)
567e5479
ACM
19{
20 return 0;
21}
5f4d3f88 22
ca59bcbc
ACM
23static inline void ui_progress__update(u64 curr __used, u64 total __used,
24 const char *title __used) {}
b8631e6e
ACM
25
26#define ui__error(format, arg...) ui__warning(format, ##arg)
ba47a142
NK
27
28static inline int
29perf_error__register(struct perf_error_ops *eops __used)
30{
31 return 0;
32}
33
34static inline int
35perf_error__unregister(struct perf_error_ops *eops __used)
36{
37 return 0;
38}
39
40#else /* NO_NEWT_SUPPORT && NO_GTK2_SUPPORT */
41
1e6dd077
ACM
42extern char ui_helpline__last_msg[];
43int ui_helpline__show_help(const char *format, va_list ap);
aca7a94d 44#include "../ui/progress.h"
4610e413 45int ui__error(const char *format, ...) __attribute__((format(printf, 1, 2)));
ba47a142
NK
46#include "../ui/util.h"
47
48#endif /* NO_NEWT_SUPPORT && NO_GTK2_SUPPORT */
8b40f521 49
4610e413
ACM
50int ui__warning(const char *format, ...) __attribute__((format(printf, 1, 2)));
51int ui__error_paranoid(void);
068ffaa8 52
8b40f521 53#endif /* __PERF_DEBUG_H */