diff options
author | Adrian Hunter <adrian.hunter@intel.com> | 2022-07-11 12:32:05 +0300 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2022-07-20 11:08:37 -0300 |
commit | a5367ecb5353fbf28bfd3979fc4f61ddebec80b1 (patch) | |
tree | eed8b8c2b6de100c6c798a4b70e19d469bd0ffe8 /tools/perf/util/data.h | |
parent | perf tools: Make has_kcore_dir() work also for guest kcore_dir (diff) | |
download | linux-dev-a5367ecb5353fbf28bfd3979fc4f61ddebec80b1.tar.xz linux-dev-a5367ecb5353fbf28bfd3979fc4f61ddebec80b1.zip |
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>
Diffstat (limited to 'tools/perf/util/data.h')
-rw-r--r-- | tools/perf/util/data.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/tools/perf/util/data.h b/tools/perf/util/data.h index 7de53d6e2d7f..173132d502f5 100644 --- a/tools/perf/util/data.h +++ b/tools/perf/util/data.h @@ -101,5 +101,6 @@ unsigned long perf_data__size(struct perf_data *data); int perf_data__make_kcore_dir(struct perf_data *data, char *buf, size_t buf_sz); bool has_kcore_dir(const char *path); char *perf_data__kallsyms_name(struct perf_data *data); +char *perf_data__guest_kallsyms_name(struct perf_data *data, pid_t machine_pid); bool is_perf_data(const char *path); #endif /* __PERF_DATA_H */ |