aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/arch/powerpc/util/sym-handling.c
diff options
context:
space:
mode:
Diffstat (limited to 'tools/perf/arch/powerpc/util/sym-handling.c')
-rw-r--r--tools/perf/arch/powerpc/util/sym-handling.c29
1 files changed, 25 insertions, 4 deletions
diff --git a/tools/perf/arch/powerpc/util/sym-handling.c b/tools/perf/arch/powerpc/util/sym-handling.c
index c6d0f91731a1..35745a733100 100644
--- a/tools/perf/arch/powerpc/util/sym-handling.c
+++ b/tools/perf/arch/powerpc/util/sym-handling.c
@@ -54,10 +54,6 @@ int arch__compare_symbol_names(const char *namea, const char *nameb)
54#endif 54#endif
55 55
56#if defined(_CALL_ELF) && _CALL_ELF == 2 56#if defined(_CALL_ELF) && _CALL_ELF == 2
57bool arch__prefers_symtab(void)
58{
59 return true;
60}
61 57
62#ifdef HAVE_LIBELF_SUPPORT 58#ifdef HAVE_LIBELF_SUPPORT
63void arch__sym_update(struct symbol *s, GElf_Sym *sym) 59void arch__sym_update(struct symbol *s, GElf_Sym *sym)
@@ -100,4 +96,29 @@ void arch__fix_tev_from_maps(struct perf_probe_event *pev,
100 tev->point.offset += lep_offset; 96 tev->point.offset += lep_offset;
101 } 97 }
102} 98}
99
100#ifdef HAVE_LIBELF_SUPPORT
101void arch__post_process_probe_trace_events(struct perf_probe_event *pev,
102 int ntevs)
103{
104 struct probe_trace_event *tev;
105 struct map *map;
106 struct symbol *sym = NULL;
107 struct rb_node *tmp;
108 int i = 0;
109
110 map = get_target_map(pev->target, pev->uprobes);
111 if (!map || map__load(map, NULL) < 0)
112 return;
113
114 for (i = 0; i < ntevs; i++) {
115 tev = &pev->tevs[i];
116 map__for_each_symbol(map, sym, tmp) {
117 if (map->unmap_ip(map, sym->start) == tev->point.address)
118 arch__fix_tev_from_maps(pev, tev, map, sym);
119 }
120 }
121}
122#endif /* HAVE_LIBELF_SUPPORT */
123
103#endif 124#endif