| .. | .. |
|---|
| 3 | 3 | #ifndef __PERF_DEBUG_H |
|---|
| 4 | 4 | #define __PERF_DEBUG_H |
|---|
| 5 | 5 | |
|---|
| 6 | +#include <stdarg.h> |
|---|
| 6 | 7 | #include <stdbool.h> |
|---|
| 7 | | -#include <string.h> |
|---|
| 8 | 8 | #include <linux/compiler.h> |
|---|
| 9 | | -#include "event.h" |
|---|
| 10 | | -#include "../ui/helpline.h" |
|---|
| 11 | | -#include "../ui/progress.h" |
|---|
| 12 | | -#include "../ui/util.h" |
|---|
| 13 | 9 | |
|---|
| 14 | 10 | extern int verbose; |
|---|
| 11 | +extern int debug_peo_args; |
|---|
| 15 | 12 | extern bool quiet, dump_trace; |
|---|
| 16 | 13 | extern int debug_ordered_events; |
|---|
| 17 | 14 | extern int debug_data_convert; |
|---|
| .. | .. |
|---|
| 34 | 31 | #define pr_debug3(fmt, ...) pr_debugN(3, pr_fmt(fmt), ##__VA_ARGS__) |
|---|
| 35 | 32 | #define pr_debug4(fmt, ...) pr_debugN(4, pr_fmt(fmt), ##__VA_ARGS__) |
|---|
| 36 | 33 | |
|---|
| 34 | +/* Special macro to print perf_event_open arguments/return value. */ |
|---|
| 35 | +#define pr_debug2_peo(fmt, ...) { \ |
|---|
| 36 | + if (debug_peo_args) \ |
|---|
| 37 | + pr_debugN(0, pr_fmt(fmt), ##__VA_ARGS__); \ |
|---|
| 38 | + else \ |
|---|
| 39 | + pr_debugN(2, pr_fmt(fmt), ##__VA_ARGS__); \ |
|---|
| 40 | +} |
|---|
| 41 | + |
|---|
| 37 | 42 | #define pr_time_N(n, var, t, fmt, ...) \ |
|---|
| 38 | 43 | eprintf_time(n, var, t, fmt, ##__VA_ARGS__) |
|---|
| 39 | 44 | |
|---|
| .. | .. |
|---|
| 42 | 47 | |
|---|
| 43 | 48 | #define STRERR_BUFSIZE 128 /* For the buffer size of str_error_r */ |
|---|
| 44 | 49 | |
|---|
| 50 | +union perf_event; |
|---|
| 51 | + |
|---|
| 45 | 52 | int dump_printf(const char *fmt, ...) __printf(1, 2); |
|---|
| 46 | 53 | void trace_event(union perf_event *event); |
|---|
| 47 | 54 | |
|---|