summaryrefslogtreecommitdiffstats
path: root/tools/perf/util/event.c
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@redhat.com>2018-04-26 16:52:34 -0300
committerArnaldo Carvalho de Melo <acme@redhat.com>2018-04-27 10:47:06 -0300
commit3183f8ca304fd84096c44332f9bb699943beb6f1 (patch)
treebe40e5bb5eb54f4ce203f606c509d733c81ee8fe /tools/perf/util/event.c
parente9814df8645d82b6c5d185537f9510028e35c385 (diff)
downloadlinux-3183f8ca304fd84096c44332f9bb699943beb6f1.tar.bz2
perf symbols: Unify symbol maps
Remove the split of symbol tables for data (MAP__VARIABLE) and for functions (MAP__FUNCTION), its unneeded and there were various places doing two lookups to find a symbol, so simplify this. We still will consider only the symbols that matched the filters in place, i.e. see the (elf_(sec,sym)|symbol_type)__filter() routines in the patch, just so that we consider only the same symbols as before, to reduce the possibility of regressions. All the tests on 50-something build environments, in varios versions of lots of distros and cross build environments were performed without build regressions, as usual with all pull requests the other tests were also performed: 'perf test' and 'make -C tools/perf build-test'. Also this was done at a great granularity so that regressions can be bisected more easily. Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: David Ahern <dsahern@gmail.com> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Wang Nan <wangnan0@huawei.com> Link: https://lkml.kernel.org/n/tip-hiq0fy2rsleupnqqwuojo1ne@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/util/event.c')
-rw-r--r--tools/perf/util/event.c13
1 files changed, 3 insertions, 10 deletions
diff --git a/tools/perf/util/event.c b/tools/perf/util/event.c
index 7831c2266118..244135b5ea43 100644
--- a/tools/perf/util/event.c
+++ b/tools/perf/util/event.c
@@ -1488,8 +1488,8 @@ int perf_event__process(struct perf_tool *tool __maybe_unused,
return machine__process_event(machine, event, sample);
}
-static struct map *__thread__find_map(struct thread *thread, u8 cpumode, enum map_type type,
- u64 addr, struct addr_location *al)
+struct map *thread__find_map(struct thread *thread, u8 cpumode, u64 addr,
+ struct addr_location *al)
{
struct map_groups *mg = thread->mg;
struct machine *machine = mg->machine;
@@ -1534,7 +1534,7 @@ static struct map *__thread__find_map(struct thread *thread, u8 cpumode, enum ma
return NULL;
}
try_again:
- al->map = __map_groups__find(mg, type, al->addr);
+ al->map = map_groups__find(mg, al->addr);
if (al->map == NULL) {
/*
* If this is outside of all known maps, and is a negative
@@ -1565,13 +1565,6 @@ try_again:
return al->map;
}
-struct map *thread__find_map(struct thread *thread, u8 cpumode, u64 addr,
- struct addr_location *al)
-{
- struct map *map = __thread__find_map(thread, cpumode, MAP__FUNCTION, addr, al);
- return map ?: __thread__find_map(thread, cpumode, MAP__VARIABLE, addr, al);
-}
-
struct symbol *thread__find_symbol(struct thread *thread, u8 cpumode,
u64 addr, struct addr_location *al)
{