Skip to content

perf intel pt: Update instruction decoder for APX and other new instructions

Adrian Hunter linux-perf-users lkml 1 version Applied

Status from this message: The following commit has been merged into the perf/core branch of tip:

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest10 patches 7 repliesApplied

Patches in v1 Applied

#Subject and filesSizeRepliesApplied
1/10x86/insn: Add Key Locker instructions to the opcode maparch/x86/lib/x86-opcode-map.txt tools/arch/x86/lib/x86-opcode-map.txt+14 -80 replies
2/10x86/insn: Fix PUSH instruction in x86 instruction decoder opcode maparch/x86/lib/x86-opcode-map.txt tools/arch/x86/lib/x86-opcode-map.txt+2 -22 replies
3/10x86/insn: Add VEX versions of VPDPBUSD, VPDPBUSDS, VPDPWSSD and VPDPWSSDSarch/x86/lib/x86-opcode-map.txt tools/arch/x86/lib/x86-opcode-map.txt+8 -80 replies
4/10x86/insn: Add misc new Intel instructionsarch/x86/lib/x86-opcode-map.txt tools/arch/x86/lib/x86-opcode-map.txt+90 -240 replies
5/10x86/insn: Add support for REX2 prefix to the instruction decoder logicarch/x86/include/asm/inat.h arch/x86/include/asm/insn.h arch/x86/lib/insn.c +5 more+132 -122 replies
6/10x86/insn: x86/insn: Add support for REX2 prefix to the instruction decoder opcode maparch/x86/lib/x86-opcode-map.txt tools/arch/x86/lib/x86-opcode-map.txt+152 -1440 replies
7/10x86/insn: Add support for APX EVEX to the instruction decoder logicarch/x86/include/asm/inat.h arch/x86/include/asm/insn.h arch/x86/lib/insn.c +5 more+42 -00 replies
8/10x86/insn: Add support for APX EVEX instructions to the opcode maparch/x86/lib/x86-opcode-map.txt tools/arch/x86/lib/x86-opcode-map.txt+186 -00 replies
9/10perf intel pt: Add new JMPABS instruction to the Intel PT instruction decodertools/perf/util/intel-pt-decoder/intel-pt-insn-decoder.c+9 -02 replies
10/10perf tests: Add APX and other new instructions to x86 instruction decoder testtools/perf/arch/x86/tests/insn-x86-dat-32.c tools/perf/arch/x86/tests/insn-x86-dat-64.c tools/perf/arch/x86/tests/insn-x86-dat-src.c+1739 -00 replies

Reviews trailers per patch

1 of 10 patches has a Reviewed-by or Acked-by.

PatchDan Williams
1/10R-b
2/10
3/10
4/10
5/10
6/10
7/10
8/10
9/10
10/10

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

Read the v1 thread

Cover letter [PATCH 00/10] perf intel pt: Update instruction decoder for APX and other new instructions

Hi

The x86 instruction decoder is used not only for decoding kernel instructions. It is also used by perf uprobes (user space probes) and by perf tools Intel Processor Trace decoding. Consequently, it needs to support instructions executed by user space also.

It should be noted that there are 2 copies of the instruction decoder. One for the kernel and one for tools, which is a policy to prevent changes from breaking builds.

Changes are based upon documents:

Intel® Advanced Performance Extensions (Intel® APX) Architecture Specification
April, 2024 Revision 4.0 355828-004

Intel® Architecture Instruction Set Extensions and Future Features Programming Reference March 2024 319433-052

The patches depend on a patch by Chang S. Bae that they have already submitted in their Key Locker patch set. Nevertheless, the patch is included in this patch set as well.

The final patch is an update to the perf tools' "x86 instruction decoder test - new instructions" test, which provides testing.

Adrian Hunter (9):
x86/insn: Fix PUSH instruction in x86 instruction decoder opcode map x86/insn: Add VEX versions of VPDPBUSD, VPDPBUSDS, VPDPWSSD and VPDPWSSDS x86/insn: Add misc new Intel instructions
x86/insn: Add support for REX2 prefix to the instruction decoder logic x86/insn: x86/insn: Add support for REX2 prefix to the instruction decoder opcode map x86/insn: Add support for APX EVEX to the instruction decoder logic x86/insn: Add support for APX EVEX instructions to the opcode map
perf intel pt: Add new JMPABS instruction to the Intel PT instruction decoder perf tests: Add APX and other new instructions to x86 instruction decoder test

Chang S. Bae (1):
x86/insn: Add Key Locker instructions to the opcode map

 arch/x86/include/asm/inat.h                        |   17 +-
 arch/x86/include/asm/insn.h                        |   32 +-
 arch/x86/lib/insn.c                                |   29 +
 arch/x86/lib/x86-opcode-map.txt                    |  315 ++++--
 arch/x86/tools/gen-insn-attr-x86.awk               |   15 +-
 tools/arch/x86/include/asm/inat.h                  |   17 +-
 tools/arch/x86/include/asm/insn.h                  |   32 +-
 tools/arch/x86/lib/insn.c                          |   29 +
 tools/arch/x86/lib/x86-opcode-map.txt              |  315 ++++--
 tools/arch/x86/tools/gen-insn-attr-x86.awk         |   15 +-
 tools/perf/arch/x86/tests/insn-x86-dat-32.c        |  116 +++
 tools/perf/arch/x86/tests/insn-x86-dat-64.c        | 1026 ++++++++++++++++++++
 tools/perf/arch/x86/tests/insn-x86-dat-src.c       |  597 ++++++++++++
 .../util/intel-pt-decoder/intel-pt-insn-decoder.c  |    9 +
 14 files changed, 2370 insertions(+), 194 deletions(-)

Regards
Adrian