From af07eeb04ca9c992b67a59aa8bc10118b610d518 Mon Sep 17 00:00:00 2001 From: Arnaldo Carvalho de Melo Date: Wed, 25 Apr 2018 17:46:28 -0300 Subject: perf symbols: Remove map_type arg from dso__find_symbol() One more step to ditch MAP__{VARIABLE,FUNCTION} Cc: Adrian Hunter Cc: David Ahern Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Link: https://lkml.kernel.org/n/tip-919d1k13ts62pjipnpibvgwd@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo --- tools/perf/util/symbol.h | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'tools/perf/util/symbol.h') diff --git a/tools/perf/util/symbol.h b/tools/perf/util/symbol.h index 924f465307b1..2b985ff2e725 100644 --- a/tools/perf/util/symbol.h +++ b/tools/perf/util/symbol.h @@ -262,10 +262,14 @@ int dso__load_kallsyms(struct dso *dso, const char *filename, struct map *map); void dso__insert_symbol(struct dso *dso, enum map_type type, struct symbol *sym); -struct symbol *dso__find_symbol(struct dso *dso, enum map_type type, - u64 addr); -struct symbol *dso__find_symbol_by_name(struct dso *dso, enum map_type type, - const char *name); +struct symbol *__dso__find_symbol(struct dso *dso, enum map_type type, u64 addr); +struct symbol *__dso__find_symbol_by_name(struct dso *dso, enum map_type type, const char *name); + +static inline struct symbol *dso__find_symbol(struct dso *dso, u64 addr) +{ + return __dso__find_symbol(dso, MAP__FUNCTION, addr); +} + struct symbol *symbol__next_by_name(struct symbol *sym); struct symbol *dso__first_symbol(struct dso *dso); -- cgit v1.2.3