summaryrefslogtreecommitdiff
path: root/tools/perf/util/debug.h
diff options
context:
space:
mode:
authorJiri Olsa <jolsa@kernel.org>2020-12-12 13:43:51 +0300
committerArnaldo Carvalho de Melo <acme@redhat.com>2020-12-17 20:36:17 +0300
commit8abceacff87d2fbb8e50e841d410e4808725151b (patch)
tree98cf12a563b418139d6df05b5a43042cc84a695e /tools/perf/util/debug.h
parent7cfcd1e016cce5a72b4b86a3882eb80565430f82 (diff)
downloadlinux-8abceacff87d2fbb8e50e841d410e4808725151b.tar.xz
perf debug: Add debug_set_file function
Allow to set debug output file via new debug_set_file function. It's called during perf startup in perf_debug_setup to set stderr file as default and any perf command can set it later to different file. It will be used in perf daemon command to get verbose output into log file. Signed-off-by: Jiri Olsa <jolsa@kernel.org> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: Alexei Budankov <abudankov@huawei.com> Cc: Ian Rogers <irogers@google.com> Cc: Mark Rutland <mark.rutland@arm.com> Cc: Michael Petlan <mpetlan@redhat.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Stephane Eranian <eranian@google.com> Link: http://lore.kernel.org/lkml/20201212104358.412065-2-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/util/debug.h')
-rw-r--r--tools/perf/util/debug.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/tools/perf/util/debug.h b/tools/perf/util/debug.h
index f1734abd98dd..43f712295645 100644
--- a/tools/perf/util/debug.h
+++ b/tools/perf/util/debug.h
@@ -5,6 +5,7 @@
#include <stdarg.h>
#include <stdbool.h>
+#include <stdio.h>
#include <linux/compiler.h>
extern int verbose;
@@ -62,6 +63,7 @@ int eprintf_time(int level, int var, u64 t, const char *fmt, ...) __printf(4, 5)
int veprintf(int level, int var, const char *fmt, va_list args);
int perf_debug_option(const char *str);
+void debug_set_file(FILE *file);
void perf_debug_setup(void);
int perf_quiet_option(void);