]> www.infradead.org Git - users/jedix/linux-maple.git/commit
perf intel pt: Add new JMPABS instruction to the Intel PT instruction decoder
authorAdrian Hunter <adrian.hunter@intel.com>
Thu, 2 May 2024 10:58:52 +0000 (13:58 +0300)
committerNamhyung Kim <namhyung@kernel.org>
Tue, 25 Jun 2024 18:06:19 +0000 (11:06 -0700)
commita44abd2c4c86e6e0b64cdee374e05f9964e3be5c
tree78a358940e1365eb94cf911e5c265ab27a8ec8e1
parentabc0f0c444f1c485320961c98edf27737b465e03
perf intel pt: Add new JMPABS instruction to the Intel PT instruction decoder

JMPABS is 64-bit absolute direct jump instruction, encoded with a mandatory
REX2 prefix. JMPABS is designed to be used in the procedure linkage table
(PLT) to replace indirect jumps, because it has better performance. In that
case the jump target will be amended at run time. To enable Intel PT to
follow the code, a TIP packet is always emitted when JMPABS is traced under
Intel PT.

Refer to the Intel Advanced Performance Extensions (Intel APX) Architecture
Specification for details.

Decode JMPABS as an indirect jump, because it has an associated TIP packet
the same as an indirect jump and the control flow should follow the TIP
packet payload, and not assume it is the same as the on-file object code
JMPABS target address.

Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Chang S. Bae <chang.seok.bae@intel.com>
Cc: Masami Hiramatsu <mhiramat@kernel.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Dave Hansen <dave.hansen@linux.intel.com>
Cc: Nikolay Borisov <nik.borisov@suse.com>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: x86@kernel.org
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Link: https://lore.kernel.org/r/20240502105853.5338-10-adrian.hunter@intel.com
tools/perf/util/intel-pt-decoder/intel-pt-insn-decoder.c