[PATCH 0/2] powerpc/perf: Add support for perf extended regs in powerpc
Anju T Sudhakar
anju at linux.vnet.ibm.com
Wed Apr 29 16:04:13 AEST 2020
Patch set to add support for perf extended register capability in
powerpc. The capability flag PERF_PMU_CAP_EXTENDED_REGS, is used to
indicate the PMU which support extended registers. The generic code
define the mask of extended registers as 0 for non supported architectures.
patch 2/2 defines this PERF_PMU_CAP_EXTENDED_REGS mask to output the
values of mmcr0,mmcr1,mmcr2 for POWER9.
x86/perf_regs.h is included by util/intel-pt.c, which will get compiled
when buiding perf on powerpc. Since x86/perf_regs.h has
`PERF_EXTENDED_REG_MASK` defined, defining `PERF_EXTENDED_REG_MASK` for
powerpc to add support for perf extended regs will result in perf build
error on powerpc. Currently powerpc architecture is not having support
for auxtrace. So as a workaround for this issue, patch 1/2 set
NO_AUXTRACE for powerpc. (Any other solutions are welcome.)
Patch 2/2 also add extended regs to sample_reg_mask in the tool side to use
with `-I?` option.
Anju T Sudhakar (2):
tools/perf: set no_auxtrace for powerpc
powerpc/perf: Add support for outputting extended regs in perf
intr_regs
arch/powerpc/include/asm/perf_event_server.h | 5 +++
arch/powerpc/include/uapi/asm/perf_regs.h | 13 +++++++-
arch/powerpc/perf/core-book3s.c | 1 +
arch/powerpc/perf/perf_regs.c | 29 ++++++++++++++--
arch/powerpc/perf/power9-pmu.c | 1 +
.../arch/powerpc/include/uapi/asm/perf_regs.h | 13 +++++++-
tools/perf/arch/powerpc/Makefile | 1 +
tools/perf/arch/powerpc/include/perf_regs.h | 6 +++-
tools/perf/arch/powerpc/util/perf_regs.c | 33 +++++++++++++++++++
9 files changed, 96 insertions(+), 6 deletions(-)
--
2.20.1
More information about the Linuxppc-dev
mailing list