perf map: Remove map_type arg from map_groups__find()
Subsystems (2)
tip-bot for Arnaldo Carvalho de Melo
merge botCommit-ID: e1f2a0d0f2d80c7fedb5f910367bc12d02e914a7 Gitweb: https://git.kernel.org/tip/e1f2a0d0f2d80c7fedb5f910367bc12d02e914a7 Author: Arnaldo Carvalho de Melo <[email protected]> AuthorDate: Thu, 26 Apr 2018 09:49:31 -0300 Committer: Arnaldo Carvalho de Melo <[email protected]> CommitDate: Thu, 26 Apr 2018 13:47:18 -0300
perf map: Remove map_type arg from map_groups__find()
One more step in ditching the split.
Cc Adrian Hunter <[email protected]>
Cc David Ahern <[email protected]>
Cc Jiri Olsa <[email protected]>
Cc Namhyung Kim <[email protected]>
Cc Wang Nan <[email protected]>
Signed-off-by Arnaldo Carvalho de Melo <[email protected]>
--- tools/perf/arch/arm/tests/dwarf-unwind.c | 2 +- tools/perf/arch/arm64/tests/dwarf-unwind.c | 2 +- tools/perf/arch/powerpc/tests/dwarf-unwind.c | 2 +- tools/perf/arch/x86/tests/dwarf-unwind.c | 2 +- tools/perf/util/map.h | 3 ++- 5 files changed, 6 insertions(+), 5 deletions(-)
tools/perf/arch/arm/tests/dwarf-unwind.c +1 -1
@@ -25,7 +25,7 @@ static int sample_ustack(struct perf_sample *sample, sp = (unsigned long ) regs[PERF_REG_ARM_SP ]; - map =__map_groups__find (thread->mg,MAP__VARIABLE , (u64 ) sp); + map =map_groups__find (thread->mg, (u64 )sp);if (!map) {pr_debug ("failed to get stack map\n" );free (buf);
tools/perf/arch/arm64/tests/dwarf-unwind.c +1 -1
@@ -25,7 +25,7 @@ static int sample_ustack(struct perf_sample *sample, sp = (unsigned long ) regs[PERF_REG_ARM64_SP ]; - map =__map_groups__find (thread->mg,MAP__VARIABLE , (u64 ) sp); + map =map_groups__find (thread->mg, (u64 )sp);if (!map) {pr_debug ("failed to get stack map\n" );free (buf);
tools/perf/arch/powerpc/tests/dwarf-unwind.c +1 -1
@@ -26,7 +26,7 @@ static int sample_ustack(struct perf_sample *sample, sp = (unsigned long ) regs[PERF_REG_POWERPC_R1 ]; - map =__map_groups__find (thread->mg,MAP__VARIABLE , (u64 ) sp); + map =map_groups__find (thread->mg, (u64 )sp);if (!map) {pr_debug ("failed to get stack map\n" );free (buf);
tools/perf/arch/x86/tests/dwarf-unwind.c +1 -1
@@ -26,7 +26,7 @@ static int sample_ustack(struct perf_sample *sample, sp = (unsigned long ) regs[PERF_REG_X86_SP ]; - map =__map_groups__find (thread->mg,MAP__VARIABLE , (u64 ) sp); + map =map_groups__find (thread->mg, (u64 )sp);if (!map) {pr_debug ("failed to get stack map\n" );free (buf);
tools/perf/util/map.h +2 -1
@@ -222,7 +222,8 @@ static inline struct map *__map_groups__find(struct map_groups *mg,static inline struct map *map_groups__find (struct map_groups *mg,u64 addr) { -return __map_groups__find (mg,MAP__FUNCTION , addr); +struct map *map =__map_groups__find (mg,MAP__FUNCTION , addr); +return map ?:__map_groups__find (mg,MAP__VARIABLE , addr); }struct map *map_groups__first (struct map_groups *mg);