summaryrefslogtreecommitdiffstats
path: root/tools/perf/util/session.h
diff options
context:
space:
mode:
authorNamhyung Kim <namhyung@kernel.org>2021-07-19 15:31:50 -0700
committerArnaldo Carvalho de Melo <acme@redhat.com>2021-08-02 10:09:05 -0300
commit0ae03893623dd1ddf17c1210265e5d7f9e2f3ed6 (patch)
tree2dc1ca5bf970e511191e025c1c4da4521a803622 /tools/perf/util/session.h
parent2681bd85a4b92788e265934d0d76bd56b5b08d16 (diff)
downloadlinux-stable-0ae03893623dd1ddf17c1210265e5d7f9e2f3ed6.tar.gz
linux-stable-0ae03893623dd1ddf17c1210265e5d7f9e2f3ed6.tar.bz2
linux-stable-0ae03893623dd1ddf17c1210265e5d7f9e2f3ed6.zip
perf tools: Pass a fd to perf_file_header__read_pipe()
Currently it unconditionally writes to stdout for repipe. But perf inject can direct its output to a regular file. Then it needs to write the header to the file as well. Signed-off-by: Namhyung Kim <namhyung@kernel.org> Acked-by: Jiri Olsa <jolsa@redhat.com> Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: Andi Kleen <ak@linux.intel.com> Cc: Ian Rogers <irogers@google.com> Cc: Peter Zijlstra <peterz@infradead.org> Link: http://lore.kernel.org/lkml/20210719223153.1618812-3-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/util/session.h')
-rw-r--r--tools/perf/util/session.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/perf/util/session.h b/tools/perf/util/session.h
index 9d19d2a918c6..5d8bd14a0a39 100644
--- a/tools/perf/util/session.h
+++ b/tools/perf/util/session.h
@@ -55,13 +55,13 @@ struct decomp {
struct perf_tool;
struct perf_session *__perf_session__new(struct perf_data *data,
- bool repipe,
+ bool repipe, int repipe_fd,
struct perf_tool *tool);
static inline struct perf_session *perf_session__new(struct perf_data *data,
struct perf_tool *tool)
{
- return __perf_session__new(data, false, tool);
+ return __perf_session__new(data, false, -1, tool);
}
void perf_session__delete(struct perf_session *session);