perf tools: introduce arm64 support unwind test.
Subsystems (2)
PATCH RESEND 1/1 perf tools: introduce arm64 support unwind test.
Newest libunwind does support ARM64, and perf is able to utilize it also. This patch enables the missing perf test dwarf unwind for arm64.
Test result:
# ./perf test unwind 25: Test dwarf unwind : Ok
--- tools/perf/arch/arm64/Build | 1 + tools/perf/arch/arm64/include/perf_regs.h | 3 ++ tools/perf/arch/arm64/tests/Build | 2 + tools/perf/arch/arm64/tests/dwarf-unwind.c | 61 ++++++++++++++++++++++++++++++ tools/perf/arch/arm64/tests/regs_load.S | 46 ++++++++++++++++++++++ tools/perf/tests/Build | 2 +- tools/perf/tests/builtin-test.c | 2 +- tools/perf/tests/tests.h | 2 +- 8 files changed, 116 insertions(+), 3 deletions(-) create mode 100644 tools/perf/arch/arm64/tests/Build create mode 100644 tools/perf/arch/arm64/tests/dwarf-unwind.c create mode 100644 tools/perf/arch/arm64/tests/regs_load.S
tools/perf/arch/arm64/Build +1 -0
@@ -1 +1,2 @@ libperf-y += util/ +libperf-$(CONFIG_DWARF_UNWIND) += tests/
tools/perf/arch/arm64/include/perf_regs.h +3 -0
@@ -5,8 +5,11 @@#include <linux/types.h> #include <asm/perf_regs.h> +void perf_regs_load (u64 *regs); +#define PERF_REGS_MASK ((1ULL << PERF_REG_ARM64_MAX) - 1)#define PERF_REGS_MAX PERF_REG_ARM64_MAX +#define PERF_SAMPLE_REGS_ABI PERF_SAMPLE_REGS_ABI_64#define PERF_REG_IP PERF_REG_ARM64_PC#define PERF_REG_SP PERF_REG_ARM64_SP
tools/perf/arch/arm64/tests/Build new file +2 -0
@@ -0,0 +1,2 @@ +libperf-y += regs_load.o +libperf-y += dwarf-unwind.o
tools/perf/arch/arm64/tests/dwarf-unwind.c new file +61 -0
61 lines not on this page · raw message
tools/perf/arch/arm64/tests/regs_load.S new file +46 -0
46 lines not on this page · raw message
tools/perf/tests/Build +1 -1
@@ -34,7 +34,7 @@ perf-y += kmod-path.o perf-$(CONFIG_X86) += perf-time-to-tsc.o -ifeq ($(ARCH),$(filter $(ARCH),x86 arm)) +ifeq ($(ARCH),$(filter $(ARCH),x86 arm arm64)) perf-$(CONFIG_DWARF_UNWIND) += dwarf-unwind.o endif
tools/perf/tests/builtin-test.c +1 -1
@@ -126,7 +126,7 @@ static struct test { .desc = "Test parsing with no sample_id_all bit set", .func = test__parse_no_sample_id_all, }, -#if defined(__x86_64__) || defined(__i386__) || defined(__arm__) +#if defined(__x86_64__) || defined(__i386__) || defined(__arm__) || defined(__aarch64__) #ifdef HAVE_DWARF_UNWIND_SUPPORT { .desc = "Test dwarf unwind",
tools/perf/tests/tests.h +1 -1
@@ -53,7 +53,7 @@ int test__fdarray__filter(void);int test__fdarray__add (void );int test__kmod_path__parse (void ); -#if defined(__x86_64__) || defined(__i386__) || defined(__arm__) +#if defined(__x86_64__) || defined(__i386__) || defined(__arm__) || defined(__aarch64__)#ifdef HAVE_DWARF_UNWIND_SUPPORT struct thread ;struct perf_sample ;
Signature · 1 line
1.8.3.4
Quoted 8 lines · Wang Nan
Newest libunwind does support ARM64, and perf is able to utilize it also. This patch enables the missing perf test dwarf unwind for arm64.
Test result:
# ./perf test unwind 25: Test dwarf unwind : OkSigned-off-by Wang Nan <[email protected]>
cannot try, but looks ok and match closely x86 pattern ;-)
thanks,
jirka
Quoted 8 lines · Jiri Olsa
Quoted 7 lines · Wang Nan
Newest libunwind does support ARM64, and perf is able to utilize it also. This patch enables the missing perf test dwarf unwind for arm64.
Test result:
# ./perf test unwind 25: Test dwarf unwind : Ok
Quoted 9 lines
Quoted 1 line
Signed-off-by Wang Nan <[email protected]>cannot try, but looks ok and match closely x86 pattern ;-)
Acked-by Jiri Olsa <[email protected]>thanks,
jirka
Sorry, I'm unable to find this patch in git repo (both tip/master and mainline). Is there any problem?