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 @@
#include <stdio.h>
int verbose = 0;
+int dump_trace = 0;
int eprintf(const char *fmt, ...)
{
@@ -20,3 +21,17 @@ int eprintf(const char *fmt, ...)
return ret;
}
+
+int dump_printf(const char *fmt, ...)
+{
+ va_list args;
+ int ret = 0;
+
+ if (dump_trace) {
+ va_start(args, fmt);
+ ret = vprintf(fmt, args);
+ va_end(args);
+ }
+
+ return ret;
+}