diff options
author | Ingo Molnar <mingo@kernel.org> | 2016-07-27 11:01:06 +0200 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2016-07-27 11:01:06 +0200 |
commit | e4b3e0694bbc0350251e22abc215a7ff506f9162 (patch) | |
tree | cf7db39821a1e7f7db736019888fec03285fb81c /tools/perf/util | |
parent | Merge branch 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip (diff) | |
parent | perf s390: Fix 'start' address of module's map (diff) | |
download | linux-dev-e4b3e0694bbc0350251e22abc215a7ff506f9162.tar.xz linux-dev-e4b3e0694bbc0350251e22abc215a7ff506f9162.zip |
Merge tag 'perf-urgent-for-mingo-20160726' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/urgent
Pull perf/urgent fixes from Arnaldo Carvalho de Melo:
- Fix obtaining the 'start' address for a kernel module on s390, where
.text doesn't coincide with the start of the module as reported in
/proc/modules (Song Shan Gong)
- Use official ELF e_machine value for BPF objects generated via perf + LLVM
when specifying BPF scriptlet in 'perf record/trace --event' (Wang Nan)
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'tools/perf/util')
-rw-r--r-- | tools/perf/util/machine.c | 8 | ||||
-rw-r--r-- | tools/perf/util/machine.h | 1 |
2 files changed, 9 insertions, 0 deletions
diff --git a/tools/perf/util/machine.c b/tools/perf/util/machine.c index bc2cdbd09a25..cb6388dbdd98 100644 --- a/tools/perf/util/machine.c +++ b/tools/perf/util/machine.c @@ -1093,12 +1093,20 @@ static int machine__set_modules_path(struct machine *machine) return map_groups__set_modules_path_dir(&machine->kmaps, modules_path, 0); } +int __weak arch__fix_module_text_start(u64 *start __maybe_unused, + const char *name __maybe_unused) +{ + return 0; +} static int machine__create_module(void *arg, const char *name, u64 start) { struct machine *machine = arg; struct map *map; + if (arch__fix_module_text_start(&start, name) < 0) + return -1; + map = machine__findnew_module_map(machine, start, name); if (map == NULL) return -1; diff --git a/tools/perf/util/machine.h b/tools/perf/util/machine.h index 41ac9cfd416b..20739f746bc4 100644 --- a/tools/perf/util/machine.h +++ b/tools/perf/util/machine.h @@ -216,6 +216,7 @@ struct symbol *machine__find_kernel_function_by_name(struct machine *machine, struct map *machine__findnew_module_map(struct machine *machine, u64 start, const char *filename); +int arch__fix_module_text_start(u64 *start, const char *name); int __machine__load_kallsyms(struct machine *machine, const char *filename, enum map_type type, bool no_kcore, symbol_filter_t filter); |