public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* latest perf code fails to parse existing data file
@ 2013-09-02 21:37 David Ahern
  2013-09-03  6:40 ` Adrian Hunter
  0 siblings, 1 reply; 6+ messages in thread
From: David Ahern @ 2013-09-02 21:37 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo, Adrian Hunter; +Cc: LKML

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 <adrian.hunter@intel.com>
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@intel.com>
     Cc: David Ahern <dsahern@gmail.com>
     Cc: Frederic Weisbecker <fweisbec@gmail.com>
     Cc: Ingo Molnar <mingo@kernel.org>
     Cc: Jiri Olsa <jolsa@redhat.com>
     Cc: Mike Galbraith <efault@gmx.de>
     Cc: Namhyung Kim <namhyung@gmail.com>
     Cc: Paul Mackerras <paulus@samba.org>
     Cc: Peter Zijlstra <peterz@infradead.org>
     Cc: Stephane Eranian <eranian@google.com>
     Link: 
http://lkml.kernel.org/r/1377591794-30553-8-git-send-email-adrian.hunter@intel.com
     Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>

: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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: latest perf code fails to parse existing data file
  2013-09-02 21:37 latest perf code fails to parse existing data file David Ahern
@ 2013-09-03  6:40 ` Adrian Hunter
  2013-09-03 12:50   ` David Ahern
  0 siblings, 1 reply; 6+ messages in thread
From: Adrian Hunter @ 2013-09-03  6:40 UTC (permalink / raw)
  To: David Ahern; +Cc: Arnaldo Carvalho de Melo, LKML

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@intel.com>
> 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@intel.com>
>     Cc: David Ahern <dsahern@gmail.com>
>     Cc: Frederic Weisbecker <fweisbec@gmail.com>
>     Cc: Ingo Molnar <mingo@kernel.org>
>     Cc: Jiri Olsa <jolsa@redhat.com>
>     Cc: Mike Galbraith <efault@gmx.de>
>     Cc: Namhyung Kim <namhyung@gmail.com>
>     Cc: Paul Mackerras <paulus@samba.org>
>     Cc: Peter Zijlstra <peterz@infradead.org>
>     Cc: Stephane Eranian <eranian@google.com>
>     Link:
> http://lkml.kernel.org/r/1377591794-30553-8-git-send-email-adrian.hunter@intel.com
> 
>     Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
> 
> :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
> 
> 


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: latest perf code fails to parse existing data file
  2013-09-03  6:40 ` Adrian Hunter
@ 2013-09-03 12:50   ` David Ahern
  2013-09-03 13:24     ` Adrian Hunter
  0 siblings, 1 reply; 6+ messages in thread
From: David Ahern @ 2013-09-03 12:50 UTC (permalink / raw)
  To: Adrian Hunter; +Cc: Arnaldo Carvalho de Melo, LKML

On 9/3/13 12:40 AM, Adrian Hunter wrote:
> 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
> 	...

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


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: latest perf code fails to parse existing data file
  2013-09-03 12:50   ` David Ahern
@ 2013-09-03 13:24     ` Adrian Hunter
  2013-09-03 13:45       ` David Ahern
  0 siblings, 1 reply; 6+ messages in thread
From: Adrian Hunter @ 2013-09-03 13:24 UTC (permalink / raw)
  To: David Ahern; +Cc: Arnaldo Carvalho de Melo, LKML

On 03/09/13 15:50, David Ahern wrote:
> On 9/3/13 12:40 AM, Adrian Hunter wrote:
>> 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
>>     ...
> 
> Kernel version? Is your kernel side support there?

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

> 
> 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?


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: latest perf code fails to parse existing data file
  2013-09-03 13:24     ` Adrian Hunter
@ 2013-09-03 13:45       ` David Ahern
  2013-09-04 17:54         ` David Ahern
  0 siblings, 1 reply; 6+ messages in thread
From: David Ahern @ 2013-09-03 13:45 UTC (permalink / raw)
  To: Adrian Hunter; +Cc: Arnaldo Carvalho de Melo, LKML

On 9/3/13 7:24 AM, Adrian Hunter wrote:
> On 03/09/13 15:50, David Ahern wrote:
>> Kernel version? Is your kernel side support there?
>
> The kernel version is the same as the perf version i.e. 3.9
>
>>
>> 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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: latest perf code fails to parse existing data file
  2013-09-03 13:45       ` David Ahern
@ 2013-09-04 17:54         ` David Ahern
  0 siblings, 0 replies; 6+ messages in thread
From: David Ahern @ 2013-09-04 17:54 UTC (permalink / raw)
  To: Adrian Hunter; +Cc: Arnaldo Carvalho de Melo, LKML

On 9/3/13 7:45 AM, David Ahern wrote:
> On 9/3/13 7:24 AM, Adrian Hunter wrote:
>> On 03/09/13 15:50, David Ahern wrote:
>>> Kernel version? Is your kernel side support there?
>>
>> The kernel version is the same as the perf version i.e. 3.9
>>
>>>
>>> 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


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2013-09-04 17:55 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-09-02 21:37 latest perf code fails to parse existing data file David Ahern
2013-09-03  6:40 ` Adrian Hunter
2013-09-03 12:50   ` David Ahern
2013-09-03 13:24     ` Adrian Hunter
2013-09-03 13:45       ` David Ahern
2013-09-04 17:54         ` David Ahern

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox