[PATCH 17/17] perf unwind: Remove unnecessary test

From: Arnaldo Carvalho de Melo
Date: Fri Aug 16 2019 - 16:18:27 EST


From: John Keeping <john@xxxxxxxxxxxx>

If dwarf_callchain_users is false, then unwind__prepare_access() will
not set unwind_libunwind_ops so the remaining test here is sufficient.

Signed-off-by: John Keeping <john@xxxxxxxxxxxx>
Reviewed-by: Jiri Olsa <jolsa@xxxxxxxxxx>
Cc: Alexander Shishkin <alexander.shishkin@xxxxxxxxxxxxxxx>
Cc: Konstantin Khlebnikov <khlebnikov@xxxxxxxxxxxxxx>
Cc: Namhyung Kim <namhyung@xxxxxxxxxx>
Cc: Peter Zijlstra <peterz@xxxxxxxxxxxxx>
Cc: john keeping <john@xxxxxxxxxxxx>
Link: http://lkml.kernel.org/r/20190815100146.28842-3-john@xxxxxxxxxxxx
Signed-off-by: Arnaldo Carvalho de Melo <acme@xxxxxxxxxx>
---
tools/perf/util/unwind-libunwind.c | 6 ------
1 file changed, 6 deletions(-)

diff --git a/tools/perf/util/unwind-libunwind.c b/tools/perf/util/unwind-libunwind.c
index b843f9d0a9ea..6499b22b158b 100644
--- a/tools/perf/util/unwind-libunwind.c
+++ b/tools/perf/util/unwind-libunwind.c
@@ -69,18 +69,12 @@ int unwind__prepare_access(struct map_groups *mg, struct map *map,

void unwind__flush_access(struct map_groups *mg)
{
- if (!dwarf_callchain_users)
- return;
-
if (mg->unwind_libunwind_ops)
mg->unwind_libunwind_ops->flush_access(mg);
}

void unwind__finish_access(struct map_groups *mg)
{
- if (!dwarf_callchain_users)
- return;
-
if (mg->unwind_libunwind_ops)
mg->unwind_libunwind_ops->finish_access(mg);
}
--
2.21.0