perf intel-pt: decoder: Add CFE (Control Flow Event) and EVD (Event Data) processing
authorAdrian Hunter <adrian.hunter@intel.com>
Mon, 24 Jan 2022 08:41:43 +0000 (10:41 +0200)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Tue, 15 Feb 2022 20:07:23 +0000 (17:07 -0300)
commit3733a98bd209a4bc7c312ee9909182371e9e9982
tree38cba4f7e4f2c6b4105219adbd8e46803beec51d
parent68ff3cba17e9d9863b64654ff800963d68be3513
perf intel-pt: decoder: Add CFE (Control Flow Event) and EVD (Event Data) processing

As of Intel SDM (https://www.intel.com/sdm) version 076, there is a new
Intel PT feature called Event Trace which requires 2 new packets CFE
(Control Flow Event) and EVD (Event Data).

Each Event Trace event is represented by a CFE packet that is preceded
by zero or more EVD packets. It may be bound to a following FUP (Flow
Update) packet that provides the IP.

Event Trace exposes details about asynchronous events. The CFE packet
contains a type field to identify one of the following:

 1 INTR interrupt, fault, exception, NMI
 2 IRET interrupt return
 3 SMI system management interrupt
 4 RSM resume from system management mode
 5 SIPI startup interprocessor interrupt
 6 INIT INIT signal
 7 VMENTRY VM-Entry
 8 VMEXIT VM-Entry
 9 VMEXIT_INTR VM-Exit due to interrupt
10 SHUTDOWN Shutdown

For more details, refer to the Intel SDM, Intel Processor Trace chapter.

Add processing to the decoder for the new packets.

Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Andi Kleen <ak@linux.intel.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Link: https://lore.kernel.org/r/20220124084201.2699795-8-adrian.hunter@intel.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/util/intel-pt-decoder/intel-pt-decoder.c
tools/perf/util/intel-pt-decoder/intel-pt-decoder.h