]> git.baikalelectronics.ru Git - kernel.git/commit
perf intel-pt: Add support for emulated ptwrite
authorAdrian Hunter <adrian.hunter@intel.com>
Mon, 9 May 2022 15:23:58 +0000 (18:23 +0300)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Tue, 17 May 2022 14:55:49 +0000 (11:55 -0300)
commit533444f9cf791def59857fdb0a94572330b92b70
treef16c317f303979c5b3b6c91f6026083d31e5c18d
parent2f86858b2365308ffe739b08a95e38dc2c4363bd
perf intel-pt: Add support for emulated ptwrite

ptwrite is an Intel x86 instruction that writes arbitrary values into an
Intel PT trace. It is not supported on all hardware, so provide an
alternative that makes use of TNT packets to convey the payload data.
TNT packets encode Taken/Not-taken conditional branch information, so
taking branches based on the payload value will encode the value into
the TNT packet. Refer to the changes to the documentation file
perf-intel-pt.txt in this patch for an example.

Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Link: https://lore.kernel.org/r/20220509152400.376613-2-adrian.hunter@intel.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/Documentation/perf-intel-pt.txt
tools/perf/util/intel-pt-decoder/intel-pt-decoder.c
tools/perf/util/intel-pt-decoder/intel-pt-decoder.h
tools/perf/util/intel-pt-decoder/intel-pt-insn-decoder.c
tools/perf/util/intel-pt-decoder/intel-pt-insn-decoder.h
tools/perf/util/intel-pt.c