perf tools: Store build id when available in PERF_RECORD_MMAP2 metadata events
authorJiri Olsa <jolsa@kernel.org>
Mon, 14 Dec 2020 10:54:49 +0000 (11:54 +0100)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Mon, 28 Dec 2020 13:01:55 +0000 (10:01 -0300)
commit1ca6e80254141d26262acc5471df9955ec40dbfb
tree0209383bf84c456ec94b71add0d8206d2edc7ead
parent29245ae8ff658bd8cd0d78bfb8c2801e66db6ee7
perf tools: Store build id when available in PERF_RECORD_MMAP2 metadata events

When processing a PERF_RECORD_MMAP2 metadata event, check on the build
id misc bit: PERF_RECORD_MISC_MMAP_BUILD_ID and if it is set, store the
build id in mmap's dso object.

Also adding the build id data to struct perf_record_mmap2 event
definition.

Signed-off-by: Jiri Olsa <jolsa@kernel.org>
Acked-by: Namhyung Kim <namhyung@kernel.org>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Alexei Budankov <abudankov@huawei.com>
Cc: Andi Kleen <ak@linux.intel.com>
Cc: Ian Rogers <irogers@google.com>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Michael Petlan <mpetlan@redhat.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Song Liu <songliubraving@fb.com>
Cc: Stephane Eranian <eranian@google.com>
Link: http://lore.kernel.org/lkml/20201214105457.543111-8-jolsa@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/lib/perf/include/perf/event.h
tools/perf/util/machine.c
tools/perf/util/map.c
tools/perf/util/map.h