From: Ian Rogers Date: Fri, 11 Feb 2022 10:34:03 +0000 (-0800) Subject: perf map: Make map__contains_symbol() args const X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=59835f55ce026df6eb8d022f5bc2a14f5151555d;p=linux.git perf map: Make map__contains_symbol() args const Now unmap_ip is const, make contains symbol const. Signed-off-by: Ian Rogers Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Alexey Bayduraev Cc: Andi Kleen Cc: Andrew Morton Cc: André Almeida Cc: Andy Shevchenko Cc: Darren Hart Cc: Davidlohr Bueso Cc: Dmitriy Vyukov Cc: Eric Dumazet Cc: German Gomez Cc: Hao Luo Cc: James Clark Cc: Jin Yao Cc: Jiri Olsa Cc: John Garry Cc: Kajol Jain Cc: Kan Liang Cc: Leo Yan Cc: Madhavan Srinivasan Cc: Mark Rutland Cc: Masami Hiramatsu Cc: Miaoqian Lin Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Riccardo Mancini Cc: Shunsuke Nakamura Cc: Song Liu Cc: Stephane Eranian Cc: Stephen Brennan Cc: Steven Rostedt (VMware) Cc: Thomas Gleixner Cc: Thomas Richter Cc: Yury Norov Link: http://lore.kernel.org/lkml/20220211103415.2737789-11-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo --- diff --git a/tools/perf/util/map.c b/tools/perf/util/map.c index 59cab31e79d41..1803d3887afed 100644 --- a/tools/perf/util/map.c +++ b/tools/perf/util/map.c @@ -513,7 +513,7 @@ u64 map__objdump_2mem(struct map *map, u64 ip) return ip + map->reloc; } -bool map__contains_symbol(struct map *map, struct symbol *sym) +bool map__contains_symbol(const struct map *map, const struct symbol *sym) { u64 ip = map->unmap_ip(map, sym->start); diff --git a/tools/perf/util/map.h b/tools/perf/util/map.h index 212a9468d5e10..3dcfe06db6b33 100644 --- a/tools/perf/util/map.h +++ b/tools/perf/util/map.h @@ -152,7 +152,7 @@ static inline bool __map__is_kmodule(const struct map *map) bool map__has_symbols(const struct map *map); -bool map__contains_symbol(struct map *map, struct symbol *sym); +bool map__contains_symbol(const struct map *map, const struct symbol *sym); #define ENTRY_TRAMPOLINE_NAME "__entry_SYSCALL_64_trampoline"