aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--tools/perf/util/probe-event.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/tools/perf/util/probe-event.c b/tools/perf/util/probe-event.c
index f272a711ad15..6b95985db5b0 100644
--- a/tools/perf/util/probe-event.c
+++ b/tools/perf/util/probe-event.c
@@ -2507,7 +2507,6 @@ static int find_probe_trace_events_from_map(struct perf_probe_event *pev,
2507 int max_tevs, const char *target) 2507 int max_tevs, const char *target)
2508{ 2508{
2509 struct map *map = NULL; 2509 struct map *map = NULL;
2510 struct kmap *kmap = NULL;
2511 struct ref_reloc_sym *reloc_sym = NULL; 2510 struct ref_reloc_sym *reloc_sym = NULL;
2512 struct symbol *sym; 2511 struct symbol *sym;
2513 struct probe_trace_event *tev; 2512 struct probe_trace_event *tev;
@@ -2540,8 +2539,7 @@ static int find_probe_trace_events_from_map(struct perf_probe_event *pev,
2540 } 2539 }
2541 2540
2542 if (!pev->uprobes && !pp->retprobe) { 2541 if (!pev->uprobes && !pp->retprobe) {
2543 kmap = map__kmap(map); 2542 reloc_sym = kernel_get_ref_reloc_sym();
2544 reloc_sym = kmap->ref_reloc_sym;
2545 if (!reloc_sym) { 2543 if (!reloc_sym) {
2546 pr_warning("Relocated base symbol is not found!\n"); 2544 pr_warning("Relocated base symbol is not found!\n");
2547 ret = -EINVAL; 2545 ret = -EINVAL;