From 83cf774b028fa67acfdd0176d54aa9387c2ad10d Mon Sep 17 00:00:00 2001 From: Arnaldo Carvalho de Melo Date: Tue, 24 Apr 2018 12:16:09 -0300 Subject: perf map: Shorten map_groups__find_by_name() signature Another step in the road to elliminate the MAP_{FUNCTION,VARIABLE} separation, reducing the exposure to these details in the tools using the symbol APIs. Cc: Adrian Hunter Cc: David Ahern Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Link: https://lkml.kernel.org/n/tip-8a1hvrqe3r5i0kw865u3uxwt@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo --- tools/perf/util/map.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'tools/perf/util/map.h') diff --git a/tools/perf/util/map.h b/tools/perf/util/map.h index fc91bac8fed0..8ff75be0a965 100644 --- a/tools/perf/util/map.h +++ b/tools/perf/util/map.h @@ -254,8 +254,12 @@ struct symbol *map_groups__find_function_by_name(struct map_groups *mg, int map_groups__fixup_overlappings(struct map_groups *mg, struct map *map, FILE *fp); -struct map *map_groups__find_by_name(struct map_groups *mg, - enum map_type type, const char *name); +struct map *__map_groups__find_by_name(struct map_groups *mg, enum map_type type, const char *name); + +static inline struct map *map_groups__find_by_name(struct map_groups *mg, const char *name) +{ + return __map_groups__find_by_name(mg, MAP__FUNCTION, name); +} bool __map__is_kernel(const struct map *map); -- cgit v1.2.3