Re: latest perf code fails to parse existing data file

From: Adrian Hunter
Date: Tue Sep 03 2013 - 02:33:46 EST


On 03/09/13 00:37, David Ahern wrote:
> Arnaldo/Adrian:
>
> Latest acme core tree fails to parse an existing data file:
>
> $ perf trace -i perf.data
> 0x16b8 [0x40]: failed to process type: 1
> Failed to process events, error -22

I can't reproduce this. The following works:

$ perf --version
perf version 3.9.10-100.fc17.x86_64
$ sudo perf record -e raw_syscalls:* ls
...
$ tools/perf/perf --version
perf version 3.11.rc4.g31cd38
$ sudo tools/perf/perf script
...
$ sudo tools/perf/perf trace -i perf.data
...

>
> git bisect traced it to:
> $ git bisect bad
> 75562573bab35b129cfd342fc2bcf89da84a6644 is the first bad commit
> commit 75562573bab35b129cfd342fc2bcf89da84a6644
> Author: Adrian Hunter <adrian.hunter@xxxxxxxxx>
> Date: Tue Aug 27 11:23:09 2013 +0300
>
> perf tools: Add support for PERF_SAMPLE_IDENTIFIER
>
> Enable parsing of samples with sample format bit PERF_SAMPLE_IDENTIFIER.
> In addition, if the kernel supports it, prefer it to selecting
> PERF_SAMPLE_ID thereby allowing non-matching sample types.
>
> Signed-off-by: Adrian Hunter <adrian.hunter@xxxxxxxxx>
> Cc: David Ahern <dsahern@xxxxxxxxx>
> Cc: Frederic Weisbecker <fweisbec@xxxxxxxxx>
> Cc: Ingo Molnar <mingo@xxxxxxxxxx>
> Cc: Jiri Olsa <jolsa@xxxxxxxxxx>
> Cc: Mike Galbraith <efault@xxxxxx>
> Cc: Namhyung Kim <namhyung@xxxxxxxxx>
> Cc: Paul Mackerras <paulus@xxxxxxxxx>
> Cc: Peter Zijlstra <peterz@xxxxxxxxxxxxx>
> Cc: Stephane Eranian <eranian@xxxxxxxxxx>
> Link:
> http://lkml.kernel.org/r/1377591794-30553-8-git-send-email-adrian.hunter@xxxxxxxxx
>
> Signed-off-by: Arnaldo Carvalho de Melo <acme@xxxxxxxxxx>
>
> :040000 040000 7df758341904d77c391b90ab6b6bac97324d144a
> 93839bad8ab2e6d88d3037f3dc8fd721be5e8870 M tools
>
>
> If I revert the patch (and handle the missing __perf_evsel__sample_size in
> the tests code to get it to compile) it works -- file is parsed correctly.
>
> David
>
>

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/