perf tools: Automatically use guest kcore_dir if present
authorAdrian Hunter <adrian.hunter@intel.com>
Mon, 11 Jul 2022 09:32:05 +0000 (12:32 +0300)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Wed, 20 Jul 2022 14:08:37 +0000 (11:08 -0300)
commita5367ecb5353fbf28bfd3979fc4f61ddebec80b1
treeeed8b8c2b6de100c6c798a4b70e19d469bd0ffe8
parent65691e9ff0c90109dd7d9d495d9528ad4c1b82d4
perf tools: Automatically use guest kcore_dir if present

When registering a guest machine using machine_pid from the id index,
check perf.data for a matching kcore_dir subdirectory and set the
kallsyms file name accordingly. If set, use it to find the machine's
kernel symbols and object code (from kcore).

Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
Cc: Andi Kleen <ak@linux.intel.com>
Cc: Ian Rogers <irogers@google.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-23-adrian.hunter@intel.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/util/data.c
tools/perf/util/data.h
tools/perf/util/machine.h
tools/perf/util/session.c
tools/perf/util/symbol.c