]> git.baikalelectronics.ru Git - kernel.git/commit
perf inject: Correct event attribute sizes
authorAl Grant <al.grant@arm.com>
Tue, 24 Nov 2020 19:58:17 +0000 (19:58 +0000)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Fri, 15 Jan 2021 20:28:28 +0000 (17:28 -0300)
commit5f9179f91c24f3d0bcc7724df2702e8f1bc29e1c
tree72e4a903f1c7a6d6231c9d0516b8bab217926e09
parent668ad653311b20cdfaeedc5f87bd6e6859c2a6f4
perf inject: Correct event attribute sizes

When 'perf inject' reads a perf.data file from an older version of perf,
it writes event attributes into the output with the original size field,
but lays them out as if they had the size currently used. Readers see a
corrupt file. Update the size field to match the layout.

Signed-off-by: Al Grant <al.grant@foss.arm.com>
Acked-by: Jiri Olsa <jolsa@redhat.com>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: http://lore.kernel.org/lkml/20201124195818.30603-1-al.grant@arm.com
Signed-off-by: Denis Nikitin <denik@chromium.org>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/util/header.c