perf tools: Add size to 'struct perf_record_header_build_id'
authorJiri Olsa <jolsa@kernel.org>
Tue, 13 Oct 2020 19:24:39 +0000 (21:24 +0200)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Wed, 14 Oct 2020 14:28:12 +0000 (11:28 -0300)
commitb0a323c7f0ece5dd76a5dc296ecd9175851a4283
tree8a69c14ff185fc8c939276ef88888159aa1de12c
parent39be8d0115b321ed2b28e43dca12c13ae7595f73
perf tools: Add size to 'struct perf_record_header_build_id'

We do not store size with build ids in perf data, but there's enough
space to do it. Adding misc bit PERF_RECORD_MISC_BUILD_ID_SIZE to mark
build id event with size.

With this fix the dso with md5 build id will have correct build id data
and will be usable for debuginfod processing if needed (coming in
following patches).

Committer notes:

Use %zu with size_t to fix this error on 32-bit arches:

  util/header.c: In function '__event_process_build_id':
  util/header.c:2105:3: error: format '%lu' expects argument of type 'long unsigned int', but argument 6 has type 'size_t' [-Werror=format=]
     pr_debug("build id event received for %s: %s [%lu]\n",
     ^

Signed-off-by: Jiri Olsa <jolsa@kernel.org>
Acked-by: Ian Rogers <irogers@google.com>
Link: https://lore.kernel.org/r/20201013192441.1299447-8-jolsa@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/lib/perf/include/perf/event.h
tools/perf/util/build-id.c
tools/perf/util/header.c