Skip to content

Support register names of all architectures

German Gomez linux-arm-kernel linux-csky linux-perf-users linux-riscv lkml 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest3 patches 5 repliesIn review
  2. v14 patches 11 repliesApplied

Changes in v2 from the cover letter

- Added "Reported-by" tags.
- Removed [PATCH 2/4] because it's not needed (suggested by Athira Rajeev).
- Removed [PATCH 3/4] which created additional header files with the register names of every arch.
- Introduced [PATCH 2/3] to deal with ARM and ARM64 registers having the same enum name across "/tools/perf/".
- Reworked the refactor of "perf_reg_name" function (now implemented in perf_regs.c, rather than in the header file) in [PATCH 3/3].

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3perf tools: Prevent out-of-bounds access to registerstools/perf/util/event.h tools/perf/util/perf_regs.c+7 -10 replies
2/3perf tools: Rename perf_event_arm_regs for ARM64 registerstools/perf/arch/arm64/include/perf_regs.h tools/perf/util/libunwind/arm64.c+4 -00 replies
3/3perf tools: Support register names from all archstools/perf/arch/arm/include/perf_regs.h tools/perf/arch/arm64/include/perf_regs.h tools/perf/arch/csky/include/perf_regs.h +10 more+697 -6013 replies

Reviews trailers per patch

None of the 3 patches has a Reviewed-by or Acked-by.

PatchAthira Rajeev
SeriesReviewed-and-Tested-by
1/3
2/3
3/3

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v2 thread

Cover letter [PATCH v2 0/3] Support register names of all architectures

The following changeset applies some corrections to the way system registers are processed and presented when reading perf.data files using the various perf tools.

The commit message from [3/3] shows how register names aren't correctly presented when performing x-arch analysis of perf.data files (recording in one arch, then reading the file from a different arch).

- [PATCH 1/3] Fixes a potential out-of-bounds access when reading the values of the registers in the perf.data file.
- [PATCH 2/3] Fixes an issue of ARM and ARM64 registers having the same enum name.
- [PATCH 3/3] Refactors the function "perf_reg_name" declared in the "tools/perf/util/perf_regs.h" header, in order to support every arch.

Thanks,
German

--
Changes since v1

- Added "Reported-by" tags.
- Removed [PATCH 2/4] because it's not needed (suggested by Athira Rajeev).
- Removed [PATCH 3/4] which created additional header files with the register names of every arch.
- Introduced [PATCH 2/3] to deal with ARM and ARM64 registers having the same enum name across "/tools/perf/".
- Reworked the refactor of "perf_reg_name" function (now implemented in perf_regs.c, rather than in the header file) in [PATCH 3/3].

German Gomez (3):
perf tools: Prevent out-of-bounds access to registers perf tools: Rename perf_event_arm_regs for ARM64 registers perf tools: Support register names from all archs

 tools/perf/arch/arm/include/perf_regs.h       |  42 --
 tools/perf/arch/arm64/include/perf_regs.h     |  78 +-
 tools/perf/arch/csky/include/perf_regs.h      |  82 ---
 tools/perf/arch/mips/include/perf_regs.h      |  69 --
 tools/perf/arch/powerpc/include/perf_regs.h   |  66 --
 tools/perf/arch/riscv/include/perf_regs.h     |  74 --
 tools/perf/arch/s390/include/perf_regs.h      |  78 --
 tools/perf/arch/x86/include/perf_regs.h       |  82 ---
 tools/perf/builtin-script.c                   |  18 +-
 tools/perf/util/event.h                       |   5 +-
 tools/perf/util/libunwind/arm64.c             |   2 +
 tools/perf/util/perf_regs.c                   | 671 +++++++++++++++++-
 tools/perf/util/perf_regs.h                   |  10 +-
 .../scripting-engines/trace-event-python.c    |  10 +-
 tools/perf/util/session.c                     |  25 +-
 15 files changed, 709 insertions(+), 603 deletions(-)
Signature · 1 line
2.25.1