perf data: Don't store auxtrace index for directory data file
authorJiri Olsa <[email protected]>
Fri, 8 Mar 2019 13:47:36 +0000 (14:47 +0100)
committerArnaldo Carvalho de Melo <[email protected]>
Mon, 11 Mar 2019 14:56:03 +0000 (11:56 -0300)
We can't store the auxtrace index when we store into multiple files,
because we keep only offset for it, not the file.

The auxtrace data will be processed correctly in the 'pipe' mode.

Signed-off-by: Jiri Olsa <[email protected]>
Cc: Adrian Hunter <[email protected]>
Cc: Alexander Shishkin <[email protected]>
Cc: Alexey Budankov <[email protected]>
Cc: Andi Kleen <[email protected]>
Cc: Namhyung Kim <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Cc: Stephane Eranian <[email protected]>
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
tools/perf/builtin-record.c

index f3f7f310033663f5b61752cfb6c835b280f8436e..e983c8d71a794c185092ffe7a83dcc537da492ad 100644 (file)
@@ -392,7 +392,7 @@ static int record__process_auxtrace(struct perf_tool *tool,
        size_t padding;
        u8 pad[8] = {0};
 
-       if (!perf_data__is_pipe(data)) {
+       if (!perf_data__is_pipe(data) && !perf_data__is_dir(data)) {
                off_t file_offset;
                int fd = perf_data__fd(data);
                int err;