debug.h 917 字节
Newer Older
1
/* For debugging general purposes */
2 3
#ifndef __PERF_DEBUG_H
#define __PERF_DEBUG_H
4

5
#include <stdbool.h>
6 7
#include "event.h"

8
extern int verbose;
9
extern bool quiet, dump_trace;
10

11
int dump_printf(const char *fmt, ...) __attribute__((format(printf, 1, 2)));
12
void trace_event(union perf_event *event);
13

14 15
struct ui_progress;

16
#ifdef NO_NEWT_SUPPORT
17
static inline int ui_helpline__show_help(const char *format __used, va_list ap __used)
18 19 20
{
	return 0;
}
21

22 23
static inline void ui_progress__update(u64 curr __used, u64 total __used,
				       const char *title __used) {}
24
#else
25 26
extern char ui_helpline__last_msg[];
int ui_helpline__show_help(const char *format, va_list ap);
27
#include "ui/progress.h"
28
#endif
29

30
void ui__warning(const char *format, ...) __attribute__((format(printf, 1, 2)));
31
void ui__warning_paranoid(void);
32
void ui__error(const char *format, ...) __attribute__((format(printf, 1, 2)));
33

34
#endif	/* __PERF_DEBUG_H */