From: Arnaldo Carvalho de Melo Date: Mon, 25 Jan 2016 21:01:57 +0000 (-0300) Subject: perf machine: Introduce machine__find_kernel_symbol_by_name() X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=8acd3da03c3f6e4e31472c5c73402b95a5d0f6cb;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git perf machine: Introduce machine__find_kernel_symbol_by_name() To be used in the 'vmlinux matches kallsyms' 'perf test' entry. Cc: Adrian Hunter Cc: David Ahern Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Link: http://lkml.kernel.org/n/tip-m56g1853lz2c6nhnqxibq4jd@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo --- diff --git a/tools/perf/util/machine.h b/tools/perf/util/machine.h index 2c2b443df5ba..1a3e45baf97f 100644 --- a/tools/perf/util/machine.h +++ b/tools/perf/util/machine.h @@ -179,6 +179,16 @@ struct symbol *machine__find_kernel_symbol(struct machine *machine, mapp, filter); } +static inline +struct symbol *machine__find_kernel_symbol_by_name(struct machine *machine, + enum map_type type, const char *name, + struct map **mapp, + symbol_filter_t filter) +{ + return map_groups__find_symbol_by_name(&machine->kmaps, type, name, + mapp, filter); +} + static inline struct symbol *machine__find_kernel_function(struct machine *machine, u64 addr, struct map **mapp,