aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/util/debug.c
diff options
context:
space:
mode:
Diffstat (limited to 'tools/perf/util/debug.c')
-rw-r--r--tools/perf/util/debug.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/tools/perf/util/debug.c b/tools/perf/util/debug.c
index 7cb8464abe61..8318fdee4778 100644
--- a/tools/perf/util/debug.c
+++ b/tools/perf/util/debug.c
@@ -6,6 +6,7 @@
6#include <stdio.h> 6#include <stdio.h>
7 7
8int verbose = 0; 8int verbose = 0;
9int dump_trace = 0;
9 10
10int eprintf(const char *fmt, ...) 11int eprintf(const char *fmt, ...)
11{ 12{
@@ -20,3 +21,17 @@ int eprintf(const char *fmt, ...)
20 21
21 return ret; 22 return ret;
22} 23}
24
25int dump_printf(const char *fmt, ...)
26{
27 va_list args;
28 int ret = 0;
29
30 if (dump_trace) {
31 va_start(args, fmt);
32 ret = vprintf(fmt, args);
33 va_end(args);
34 }
35
36 return ret;
37}