summaryrefslogtreecommitdiffstats
path: root/tools/perf/arch/arm64/util/unwind-libunwind.c
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 18:49:45 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 18:49:45 +0000
commit2c3c1048746a4622d8c89a29670120dc8fab93c4 (patch)
tree848558de17fb3008cdf4d861b01ac7781903ce39 /tools/perf/arch/arm64/util/unwind-libunwind.c
parentInitial commit. (diff)
downloadlinux-upstream.tar.xz
linux-upstream.zip
Adding upstream version 6.1.76.upstream/6.1.76upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r--tools/perf/arch/arm64/util/unwind-libunwind.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/tools/perf/arch/arm64/util/unwind-libunwind.c b/tools/perf/arch/arm64/util/unwind-libunwind.c
new file mode 100644
index 000000000..871af5992
--- /dev/null
+++ b/tools/perf/arch/arm64/util/unwind-libunwind.c
@@ -0,0 +1,17 @@
+// SPDX-License-Identifier: GPL-2.0
+#include <errno.h>
+
+#ifndef REMOTE_UNWIND_LIBUNWIND
+#include <libunwind.h>
+#include "perf_regs.h"
+#include "../../../util/unwind.h"
+#endif
+#include "../../../util/debug.h"
+
+int LIBUNWIND__ARCH_REG_ID(int regnum)
+{
+ if (regnum < 0 || regnum >= PERF_REG_ARM64_EXTENDED_MAX)
+ return -EINVAL;
+
+ return regnum;
+}