perf inject: Try chroot directory when reading build-id
authorNamhyung Kim <namhyung@kernel.org>
Wed, 2 Feb 2022 07:08:27 +0000 (23:08 -0800)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Thu, 10 Feb 2022 18:33:51 +0000 (15:33 -0300)
commit75d48c56703dcce45cf4d7262dbf7113c5e6607f
treeef09fd1186555b4cf789721a25fd242adc1b28bf
parent67fd18924647bdcafab18c2945a79ddea73653de
perf inject: Try chroot directory when reading build-id

When reading build-id from a DSO, it should consider if it's from a
chroot task.  In that case, the path is different so it needs to prepend
the root directory to access the file correctly.

Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Acked-by: Jiri Olsa <jolsa@kernel.org>
Cc: Andi Kleen <ak@linux.intel.com>
Cc: Ian Rogers <irogers@google.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: http://lore.kernel.org/lkml/20220202070828.143303-4-namhyung@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/builtin-inject.c