perf build-id: Add quirk to deal with perf.data file format breakage
authorArnaldo Carvalho de Melo <acme@redhat.com>
Tue, 22 Mar 2011 16:36:45 +0000 (13:36 -0300)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Wed, 23 Mar 2011 22:29:40 +0000 (19:29 -0300)
commitb25114817a73bbd2b84ce9dba02ee1ef8989a947
tree8eaad3eaa307a607f87b8ea631c5f1fc76ce4a82
parent9e69c210822c4035708a6111567c96364ca244d5
perf build-id: Add quirk to deal with perf.data file format breakage

The a1645ce1 changeset:

"perf: 'perf kvm' tool for monitoring guest performance from host"

Added a field to struct build_id_event that broke the file format.

Since the kernel build-id is the first entry, process the table using
the old format if the well known '[kernel.kallsyms]' string for the
kernel build-id has the first 4 characters chopped off (where the pid_t
sits).

Reported-by: Han Pingtian <phan@redhat.com>
Cc: Avi Kivity <avi@redhat.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stephane Eranian <eranian@google.com>
Cc: Tom Zanussi <tzanussi@gmail.com>
Cc: Zhang Yanmin <yanmin_zhang@linux.intel.com>
Cc: stable@kernel.org
LKML-Reference: <new-submission>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/util/header.c