]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commit
perf data: Support having perf.data stored as a directory
authorJiri Olsa <jolsa@kernel.org>
Fri, 8 Mar 2019 13:47:35 +0000 (14:47 +0100)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Mon, 11 Mar 2019 14:56:03 +0000 (11:56 -0300)
commitec65def1045e4c7817b7f741a86dadae82877a93
tree00dd535975e20950a1fa9a348f9615010be72030
parent98c07a8f74f85a19aeee2016f5afa0c667fa694d
perf data: Support having perf.data stored as a directory

The caller needs to set 'struct perf_data::is_dir flag and the path will
be treated as a directory.

The 'struct perf_data::file' is initialized and open as 'path/header'
file.

Add a check to the direcory interface functions to check the is_dir flag.

Signed-off-by: Jiri Olsa <jolsa@kernel.org>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Alexey Budankov <alexey.budankov@linux.intel.com>
Cc: Andi Kleen <ak@linux.intel.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stephane Eranian <eranian@google.com>
Link: http://lkml.kernel.org/r/20190308134745.5057-2-jolsa@kernel.org
[ Be consistent on how to signal failure, i.e. use -1 and let users check errno ]
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/util/data.c
tools/perf/util/data.h
tools/perf/util/session.c