perf tools: Use __maybe_used for unused variables
[GitHub/mt8127/android_kernel_alcatel_ttab.git] / tools / perf / util / debug.h
... / ...
CommitLineData
1/* For debugging general purposes */
2#ifndef __PERF_DEBUG_H
3#define __PERF_DEBUG_H
4
5#include <stdbool.h>
6#include "event.h"
7#include "../ui/helpline.h"
8
9extern int verbose;
10extern bool quiet, dump_trace;
11
12int dump_printf(const char *fmt, ...) __attribute__((format(printf, 1, 2)));
13void trace_event(union perf_event *event);
14
15struct ui_progress;
16struct perf_error_ops;
17
18#if defined(NO_NEWT_SUPPORT) && defined(NO_GTK2_SUPPORT)
19static inline void ui_progress__update(u64 curr __maybe_unused,
20 u64 total __maybe_unused,
21 const char *title __maybe_unused) {}
22
23#define ui__error(format, arg...) ui__warning(format, ##arg)
24
25static inline int
26perf_error__register(struct perf_error_ops *eops __maybe_unused)
27{
28 return 0;
29}
30
31static inline int
32perf_error__unregister(struct perf_error_ops *eops __maybe_unused)
33{
34 return 0;
35}
36
37#else /* NO_NEWT_SUPPORT && NO_GTK2_SUPPORT */
38
39#include "../ui/progress.h"
40int ui__error(const char *format, ...) __attribute__((format(printf, 1, 2)));
41#include "../ui/util.h"
42
43#endif /* NO_NEWT_SUPPORT && NO_GTK2_SUPPORT */
44
45int ui__warning(const char *format, ...) __attribute__((format(printf, 1, 2)));
46int ui__error_paranoid(void);
47
48#endif /* __PERF_DEBUG_H */