perf buildid-cache: Add guestmount'd files to the build ID cache
authorAdrian Hunter <adrian.hunter@intel.com>
Mon, 11 Jul 2022 09:31:51 +0000 (12:31 +0300)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Wed, 20 Jul 2022 14:07:53 +0000 (11:07 -0300)
commit15fe03621d9df90c23de7a2099b692e2da344cde
tree718f5c3560d6fe9ec65111ba37914238506ef956
parent57190e38b00d25abba9631b8db53740fce4baced
perf buildid-cache: Add guestmount'd files to the build ID cache

When the guestmount option is used, a guest machine's file system mount
point is recorded in machine->root_dir.

perf already iterates guest machines when adding files to the build ID
cache, but does not take machine->root_dir into account.

Use machine->root_dir to find files for guest build IDs, and add them to
the build ID cache using the "proper" name i.e. relative to the guest root
directory not the host root directory.

Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
Acked-by: Ian Rogers <irogers@google.com>
Cc: Andi Kleen <ak@linux.intel.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: kvm@vger.kernel.org
Link: https://lore.kernel.org/r/20220711093218.10967-9-adrian.hunter@intel.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/util/build-id.c
tools/perf/util/build-id.h