perf intel-pt: Add new packets for PEBS via PT
authorAdrian Hunter <adrian.hunter@intel.com>
Mon, 10 Jun 2019 07:27:53 +0000 (10:27 +0300)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Mon, 17 Jun 2019 18:57:17 +0000 (15:57 -0300)
commitedff7809c80f09398783d602c33a507309c23e24
tree478f71ef082e7d6dcb81014bc67b0a654168d720
parent374d910f87b87283df2b1e8a60a6a546d4a14c90
perf intel-pt: Add new packets for PEBS via PT

Add 3 new packets to supports PEBS via PT, namely Block Begin Packet
(BBP), Block Item Packet (BIP) and Block End Packet (BEP). PEBS data is
encoded into multiple BIP packets that come between BBP and BEP. The BEP
packet might be associated with a FUP packet. That is indicated by using
a separate packet type (INTEL_PT_BEP_IP) similar to other packets types
with the _IP suffix.

Refer to the Intel SDM for more information about PEBS via PT:

  https://software.intel.com/en-us/articles/intel-sdm
  May 2019 version: Vol. 3B 18.5.5.2 PEBS output to IntelĀ® Processor Trace

Decoding of BIP packets conflicts with single-byte TNT packets. Since
BIP packets only occur in the context of a block (i.e. between BBP and
BEP), that context must be recorded and passed to the packet decoder.

Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Link: http://lkml.kernel.org/r/20190610072803.10456-2-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-pkt-decoder.c
tools/perf/util/intel-pt-decoder/intel-pt-pkt-decoder.h
tools/perf/util/intel-pt.c