perf inject: Set PERF_RECORD_MISC_BUILD_ID_SIZE
authorNamhyung Kim <namhyung@kernel.org>
Sat, 19 Nov 2022 00:27:50 +0000 (16:27 -0800)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Wed, 23 Nov 2022 13:34:40 +0000 (10:34 -0300)
commit19030564ab116757e3270a567fd9d5b20b411d74
tree8735c003d38ec834ca5198709788e9162afa9be8
parent7d54a4acd8c1de3ea70d31424757dcdb7f0a231a
perf inject: Set PERF_RECORD_MISC_BUILD_ID_SIZE

With perf inject -b, it synthesizes build-id event for DSOs.  But it
missed to set the size and resulted in having trailing zeros.

As perf record sets the size in write_build_id(), let's set the size
here as well.

Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Acked-by: Adrian Hunter <adrian.hunter@intel.com>
Cc: Ian Rogers <irogers@google.com>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: https://lore.kernel.org/r/20221119002750.1568027-1-namhyung@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/util/synthetic-events.c