perf tools: Provide backward compatibility with previous perf.data version
authorFrederic Weisbecker <fweisbec@gmail.com>
Thu, 8 Oct 2009 20:07:29 +0000 (22:07 +0200)
committerIngo Molnar <mingo@elte.hu>
Thu, 8 Oct 2009 20:11:02 +0000 (22:11 +0200)
commit26dd2cb074d9dc41c9e3cddd7bf175fd0a41febc
tree05c0188d5ecf806e4079181989f971efa3c44d47
parent97ea1a7fa62af0d8d49a0fc12796b0073537c9d8
perf tools: Provide backward compatibility with previous perf.data version

We have merged the trace.info file into perf.data by adding one
section in the perf headers. This makes it incompatible with
previous version: the new perf tools can't read the older
perf.data.

To support the previous format, we check the headers size. If they
have the same size than in the previous format, then ignore the
trace info section that doesn't exist.

Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Paul Mackerras <paulus@samba.org>
LKML-Reference: <1255032449-12022-1-git-send-email-fweisbec@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
tools/perf/util/header.c