perf header: Add ability to keep feature sections
authorAdrian Hunter <adrian.hunter@intel.com>
Fri, 20 May 2022 13:24:00 +0000 (16:24 +0300)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Mon, 23 May 2022 13:11:01 +0000 (10:11 -0300)
commit237c96b8c1584d4c28d3593e5f52508fbec9ff06
tree5c5a638c9f1cd7d565e8be5828d192ce393a5071
parent1634b5a1f11cf407255d42fcc1d6bf257d16adab
perf header: Add ability to keep feature sections

Many feature sections should not be re-written during perf inject. In
preparation to support that, add callbacks that a tool can use to copy
a feature section from elsewhere. perf inject will use this facility to
copy features sections from the input file.

Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
Acked-by: Jiri Olsa <jolsa@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Link: https://lore.kernel.org/r/20220520132404.25853-2-adrian.hunter@intel.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/util/header.c
tools/perf/util/header.h