Commit 8b12b812 authored by Kan Liang's avatar Kan Liang Committed by Ingo Molnar

perf/x86/regs: Use PERF_REG_EXTENDED_MASK

Use the macro defined in kernel ABI header to replace the local name.

No functional change.
Signed-off-by: default avatarKan Liang <kan.liang@linux.intel.com>
Signed-off-by: default avatarPeter Zijlstra (Intel) <peterz@infradead.org>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stephane Eranian <eranian@google.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Vince Weaver <vincent.weaver@maine.edu>
Link: https://lkml.kernel.org/r/1559081314-9714-5-git-send-email-kan.liang@linux.intel.comSigned-off-by: default avatarIngo Molnar <mingo@kernel.org>
parent cd6b984f
...@@ -52,4 +52,7 @@ enum perf_event_x86_regs { ...@@ -52,4 +52,7 @@ enum perf_event_x86_regs {
/* These include both GPRs and XMMX registers */ /* These include both GPRs and XMMX registers */
PERF_REG_X86_XMM_MAX = PERF_REG_X86_XMM15 + 2, PERF_REG_X86_XMM_MAX = PERF_REG_X86_XMM15 + 2,
}; };
#define PERF_REG_EXTENDED_MASK (~((1ULL << PERF_REG_X86_XMM0) - 1))
#endif /* _ASM_X86_PERF_REGS_H */ #endif /* _ASM_X86_PERF_REGS_H */
...@@ -9,7 +9,6 @@ ...@@ -9,7 +9,6 @@
void perf_regs_load(u64 *regs); void perf_regs_load(u64 *regs);
#define PERF_REGS_MAX PERF_REG_X86_XMM_MAX #define PERF_REGS_MAX PERF_REG_X86_XMM_MAX
#define PERF_XMM_REGS_MASK (~((1ULL << PERF_REG_X86_XMM0) - 1))
#ifndef HAVE_ARCH_X86_64_SUPPORT #ifndef HAVE_ARCH_X86_64_SUPPORT
#define PERF_REGS_MASK ((1ULL << PERF_REG_X86_32_MAX) - 1) #define PERF_REGS_MASK ((1ULL << PERF_REG_X86_32_MAX) - 1)
#define PERF_SAMPLE_REGS_ABI PERF_SAMPLE_REGS_ABI_32 #define PERF_SAMPLE_REGS_ABI PERF_SAMPLE_REGS_ABI_32
......
...@@ -277,7 +277,7 @@ uint64_t arch__intr_reg_mask(void) ...@@ -277,7 +277,7 @@ uint64_t arch__intr_reg_mask(void)
.type = PERF_TYPE_HARDWARE, .type = PERF_TYPE_HARDWARE,
.config = PERF_COUNT_HW_CPU_CYCLES, .config = PERF_COUNT_HW_CPU_CYCLES,
.sample_type = PERF_SAMPLE_REGS_INTR, .sample_type = PERF_SAMPLE_REGS_INTR,
.sample_regs_intr = PERF_XMM_REGS_MASK, .sample_regs_intr = PERF_REG_EXTENDED_MASK,
.precise_ip = 1, .precise_ip = 1,
.disabled = 1, .disabled = 1,
.exclude_kernel = 1, .exclude_kernel = 1,
...@@ -293,7 +293,7 @@ uint64_t arch__intr_reg_mask(void) ...@@ -293,7 +293,7 @@ uint64_t arch__intr_reg_mask(void)
fd = sys_perf_event_open(&attr, 0, -1, -1, 0); fd = sys_perf_event_open(&attr, 0, -1, -1, 0);
if (fd != -1) { if (fd != -1) {
close(fd); close(fd);
return (PERF_XMM_REGS_MASK | PERF_REGS_MASK); return (PERF_REG_EXTENDED_MASK | PERF_REGS_MASK);
} }
return PERF_REGS_MASK; return PERF_REGS_MASK;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment