From b62d99c8e706b6b0d6db0b11dd3d9a322305412a Mon Sep 17 00:00:00 2001 From: Christian Hergert Date: Fri, 8 Nov 2024 11:42:04 -0800 Subject: [PATCH 22/33] 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