Skip to contentSkip to conversation

latest perf code fails to parse existing data file

DISCUSSION David Ahern 2 participants 6 messages Sep 2, 2013 – Sep 4, 2013

lore
Share & tools
lore
#0 lore raw

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

git bisect traced it to:

$ git bisect bad
75562573bab35b129cfd342fc2bcf89da84a6644 is the first bad commit
commit 75562573bab35b129cfd342fc2bcf89da84a6644
Author: Adrian Hunter <[email protected]>
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.

Cc David Ahern <[email protected]>
Cc Frederic Weisbecker <[email protected]>
Cc Ingo Molnar <[email protected]>
Cc Jiri Olsa <[email protected]>
Cc Mike Galbraith <[email protected]>
Cc Namhyung Kim <[email protected]>
Cc Paul Mackerras <[email protected]>
Cc Peter Zijlstra <[email protected]>
Cc Stephane Eranian <[email protected]>

Link:
http://lkml.kernel.org/r/[email protected]

: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

#1 lore raw
Quoted 7 lines · David Ahern

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
	...
Quoted 39 lines

git bisect traced it to:

$ git bisect bad
75562573bab35b129cfd342fc2bcf89da84a6644 is the first bad commit
commit 75562573bab35b129cfd342fc2bcf89da84a6644
Author: Adrian Hunter <[email protected]>
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.

Cc David Ahern <[email protected]>
Cc Frederic Weisbecker <[email protected]>
Cc Ingo Molnar <[email protected]>
Cc Jiri Olsa <[email protected]>
Cc Mike Galbraith <[email protected]>
Cc Namhyung Kim <[email protected]>
Cc Paul Mackerras <[email protected]>
Cc Peter Zijlstra <[email protected]>
Cc Stephane Eranian <[email protected]>

Link:
http://lkml.kernel.org/r/[email protected]

: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

#2 lore raw
Quoted 11 lines · Adrian Hunter
Quoted 7 lines · David Ahern

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:

Quoted 10 lines
	$ 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
	...

Kernel version? Is your kernel side support there?

For me data was collected on 2.6.34 about a week ago. Processed fine up to the point of this patch getting added.

David

#3 lore raw
Quoted 23 lines · David Ahern
Quoted 11 lines · Adrian Hunter
Quoted 7 lines · David Ahern

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:

Quoted 10 lines
    $ 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
    ...
Quoted 1 line

Kernel version? Is your kernel side support there?

The kernel version is the same as the perf version i.e. 3.9

Quoted 3 lines

For me data was collected on 2.6.34 about a week ago. Processed fine up to the point of this patch getting added.

Is it only "perf trace" that fails or does "perf script" fail too?

#4 lore raw
Quoted 10 lines · Adrian Hunter
Quoted 1 line · David Ahern

Kernel version? Is your kernel side support there?

The kernel version is the same as the perf version i.e. 3.9

Quoted 3 lines

For me data was collected on 2.6.34 about a week ago. Processed fine up to the point of this patch getting added.

Is it only "perf trace" that fails or does "perf script" fail too?

Both throw the same error. Command line used to create the file:
perf record -e raw_syscalls:* -e sched:* -p 2271 -g -- sleep 5

David

#5 lore raw
Quoted 7 lines · David Ahern
Quoted 6 lines · Adrian Hunter
Quoted 1 line · David Ahern

Kernel version? Is your kernel side support there?

The kernel version is the same as the perf version i.e. 3.9

Quoted 1 line
Quoted 8 lines
Quoted 5 lines
Quoted 3 lines

For me data was collected on 2.6.34 about a week ago. Processed fine up to
the point of this patch getting added.

Is it only "perf trace" that fails or does "perf script" fail too?

Both throw the same error. Command line used to create the file:

   perf record -e raw_syscalls:* -e sched:* -p 2271 -g -- sleep 5

Seems to be an artifact of older kernels. Definitely occurs for 2.6.34 and WindRiver Linux 4. Also reproduced with vanilla 2.6.35. Use newer perf command -- e.g., 3.11 -- to record events and then try to analyze with Linus', Arnaldo's or Ingo's latest branch which now have this patch. Given the breakage it needs to be either fixed or reverted before 3.12

David