aboutsummaryrefslogtreecommitdiff
path: root/tools/perf/util/map.c
diff options
context:
space:
mode:
authorIngo Molnar <mingo@kernel.org>2015-10-01 09:03:57 +0200
committerIngo Molnar <mingo@kernel.org>2015-10-01 09:03:57 +0200
commit4bc6a58fcbf63dc3da9870c41eeab1bd030bc585 (patch)
tree965af8015bcc5a9375e8858bf6aea52f5e45357c /tools/perf/util/map.c
parent9c17dbc6eb73bdd8a6aaea1baefd37ff78d86148 (diff)
parent7f8d1ade1b19f684ed3a7c4fb1dc5d347127b438 (diff)
Merge tag 'perf-core-for-mingo' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/core
Pull perf/core improvements and fixes: User visible changes: - By default use the most precise "cycles" hw counter available, i.e. when the user doesn't specify any event, it will try using cycles:ppp, cycles:pp, etc. (Arnaldo Carvalho de Melo) - Remove blank lines, headers when piping output in 'perf list', so that it can be sanely used with 'wc -l', etc. (Arnaldo Carvalho de Melo) - Amend documentation about max_stack and synthesized callchains. (Adrian Hunter) - Fix 'perf probe -l' for probes added to kernel module functions. (Masami Hiramatsu) Build fixes: - Fix shadowed declarations that break the build on older distros. (Jiri Olsa) - Fix build break on powerpc due to sample_reg_masks. (Sukadev Bhattiprolu) Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/util/map.c')
-rw-r--r--tools/perf/util/map.c21
1 files changed, 14 insertions, 7 deletions
diff --git a/tools/perf/util/map.c b/tools/perf/util/map.c
index b1c475d9b240..4e38c396a897 100644
--- a/tools/perf/util/map.c
+++ b/tools/perf/util/map.c
@@ -235,7 +235,7 @@ struct map *map__new2(u64 start, struct dso *dso, enum map_type type)
*/
bool __map__is_kernel(const struct map *map)
{
- return map->groups->machine->vmlinux_maps[map->type] == map;
+ return __machine__kernel_map(map->groups->machine, map->type) == map;
}
static void map__exit(struct map *map)
@@ -553,13 +553,9 @@ struct symbol *map_groups__find_symbol(struct map_groups *mg,
return NULL;
}
-struct symbol *map_groups__find_symbol_by_name(struct map_groups *mg,
- enum map_type type,
- const char *name,
- struct map **mapp,
- symbol_filter_t filter)
+struct symbol *maps__find_symbol_by_name(struct maps *maps, const char *name,
+ struct map **mapp, symbol_filter_t filter)
{
- struct maps *maps = &mg->maps[type];
struct symbol *sym;
struct rb_node *nd;
@@ -583,6 +579,17 @@ out:
return sym;
}
+struct symbol *map_groups__find_symbol_by_name(struct map_groups *mg,
+ enum map_type type,
+ const char *name,
+ struct map **mapp,
+ symbol_filter_t filter)
+{
+ struct symbol *sym = maps__find_symbol_by_name(&mg->maps[type], name, mapp, filter);
+
+ return sym;
+}
+
int map_groups__find_ams(struct addr_map_symbol *ams, symbol_filter_t filter)
{
if (ams->addr < ams->map->start || ams->addr >= ams->map->end) {