sysprof/0022-libsysprof-check-for-PERF_REG_EXTENDED_MASK-availabi.patch

31 lines
1000 B
Diff
Raw Permalink Normal View History

From be843d84b49f7cd7ce15352ab187e4197cdd887e Mon Sep 17 00:00:00 2001
From: Christian Hergert <chergert@redhat.com>
Date: Fri, 8 Nov 2024 11:42:04 -0800
Subject: [PATCH 22/31] libsysprof: check for PERF_REG_EXTENDED_MASK
availability
---
src/libsysprof/sysprof-user-sampler.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/src/libsysprof/sysprof-user-sampler.c b/src/libsysprof/sysprof-user-sampler.c
index 0e3afeae..a1418596 100644
--- a/src/libsysprof/sysprof-user-sampler.c
+++ b/src/libsysprof/sysprof-user-sampler.c
@@ -48,7 +48,11 @@
#define SYSPROF_ARCH_PREFERRED_REGS DWARF_NEEDED_REGS
/* TODO: add other architectures, imitating the linux tools/perf tree */
#else
-# define SYSPROF_ARCH_PREFERRED_REGS PERF_REG_EXTENDED_MASK
+# ifdef PERF_REG_EXTENDED_MASK
+# define SYSPROF_ARCH_PREFERRED_REGS PERF_REG_EXTENDED_MASK
+# else
+# define SYSPROF_ARCH_PREFERRED_REGS 0
+# endif
#endif /* _ASM_{arch}_PERF_REGS_H */
#define N_WAKEUP_EVENTS 149
--
2.45.2