perf tools: Add sort by src line/number
[GitHub/mt8127/android_kernel_alcatel_ttab.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
ACM
14struct ui_progress;
15
567e5479 16#ifdef NO_NEWT_SUPPORT
1e6dd077 17static 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
22static 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
27extern char ui_helpline__last_msg[];
28int ui_helpline__show_help(const char *format, va_list ap);
aca7a94d 29#include "../ui/progress.h"
4610e413 30int ui__error(const char *format, ...) __attribute__((format(printf, 1, 2)));
567e5479 31#endif
8b40f521 32
4610e413
ACM
33int ui__warning(const char *format, ...) __attribute__((format(printf, 1, 2)));
34int ui__error_paranoid(void);
068ffaa8 35
8b40f521 36#endif /* __PERF_DEBUG_H */