Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 744e9a91 authored by Kim Phillips's avatar Kim Phillips Committed by Arnaldo Carvalho de Melo
Browse files

perf tools arm64: Add libdw DWARF post unwind support for ARM64

Based on prior work:

  https://lkml.org/lkml/2014/5/6/395



and on how other arches add libdw unwind support.  Includes support for
running the unwind test, e.g., on a system with only elfutils' libdw
0.170, the test now runs, and successfully:

  $ ./perf test unwind
  56: Test dwarf unwind                 : Ok

Originally-by: default avatarJean Pihet <jean.pihet@linaro.org>
Reported-by: default avatarChristian Hansen <chansen3@cisco.com>
Signed-off-by: default avatarKim Phillips <kim.phillips@arm.com>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: http://lkml.kernel.org/r/20180308211030.4ee4a0d6ff6dc5cda1b567d4@arm.com


Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
parent 03d9fcb7
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -75,7 +75,7 @@ endif
# Disable it on all other architectures in case libdw unwind
# support is detected in system. Add supported architectures
# to the check.
ifneq ($(SRCARCH),$(filter $(SRCARCH),x86 arm powerpc s390))
ifneq ($(SRCARCH),$(filter $(SRCARCH),x86 arm arm64 powerpc s390))
  NO_LIBDW_DWARF_UNWIND := 1
endif

+12 −0
Original line number Diff line number Diff line
/* SPDX-License-Identifier: GPL-2.0 */
#ifndef ARCH_TESTS_H
#define ARCH_TESTS_H

#ifdef HAVE_DWARF_UNWIND_SUPPORT
struct thread;
struct perf_sample;
#endif

extern struct test arch_tests[];

#endif
+2 −0
Original line number Diff line number Diff line
libperf-y += regs_load.o
libperf-y += dwarf-unwind.o

libperf-y += arch-tests.o
+16 −0
Original line number Diff line number Diff line
// SPDX-License-Identifier: GPL-2.0
#include <string.h>
#include "tests/tests.h"
#include "arch-tests.h"

struct test arch_tests[] = {
#ifdef HAVE_DWARF_UNWIND_SUPPORT
	{
		.desc = "DWARF unwind",
		.func = test__dwarf_unwind,
	},
#endif
	{
		.func = NULL,
	},
};
+1 −0
Original line number Diff line number Diff line
@@ -2,6 +2,7 @@ libperf-y += header.o
libperf-y += sym-handling.o
libperf-$(CONFIG_DWARF)     += dwarf-regs.o
libperf-$(CONFIG_LOCAL_LIBUNWIND) += unwind-libunwind.o
libperf-$(CONFIG_LIBDW_DWARF_UNWIND) += unwind-libdw.o

libperf-$(CONFIG_AUXTRACE) += ../../arm/util/pmu.o \
			      ../../arm/util/auxtrace.o \
Loading