summaryrefslogtreecommitdiff
path: root/tools/perf/util/probe-event.c
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2015-10-12 10:46:53 -0700
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2015-10-12 10:46:53 -0700
commit9b22abe7b3ca3885e488ad36e5857d15f8158141 (patch)
treeb258563df85510fc70a42971b737abd9c00730a5 /tools/perf/util/probe-event.c
parent17db84eba18eaa20fab687bf38418a2286cb085a (diff)
parent25cb62b76430a91cc6195f902e61c2cb84ade622 (diff)
downloadlinux-rt-9b22abe7b3ca3885e488ad36e5857d15f8158141.tar.gz
Merge 4.3-rc5 into staging-next
We want the fixes in here as well. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'tools/perf/util/probe-event.c')
-rw-r--r--tools/perf/util/probe-event.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/tools/perf/util/probe-event.c b/tools/perf/util/probe-event.c
index eb5f18b75402..c6f9af78f6f5 100644
--- a/tools/perf/util/probe-event.c
+++ b/tools/perf/util/probe-event.c
@@ -270,12 +270,13 @@ static int kernel_get_module_dso(const char *module, struct dso **pdso)
int ret = 0;
if (module) {
- list_for_each_entry(dso, &host_machine->dsos.head, node) {
- if (!dso->kernel)
- continue;
- if (strncmp(dso->short_name + 1, module,
- dso->short_name_len - 2) == 0)
- goto found;
+ char module_name[128];
+
+ snprintf(module_name, sizeof(module_name), "[%s]", module);
+ map = map_groups__find_by_name(&host_machine->kmaps, MAP__FUNCTION, module_name);
+ if (map) {
+ dso = map->dso;
+ goto found;
}
pr_debug("Failed to find module %s.\n", module);
return -ENOENT;