Skip to content

Commit

Permalink
perf intel-pt: Improve PT documentation slightly
Browse files Browse the repository at this point in the history
Document the higher level --insn-trace etc. perf script options.

Include the howto how to build xed into the manpage

Signed-off-by: Andi Kleen <ak@linux.intel.com>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Link: http://lore.kernel.org/lkml/20201014035346.4772-1-andi@firstfloor.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
  • Loading branch information
Andi Kleen authored and Arnaldo Carvalho de Melo committed Oct 14, 2020
1 parent 0997a26 commit 6556a75
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions tools/perf/Documentation/perf-intel-pt.txt
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,32 @@ The flags are "bcrosyiABEx" which stand for branch, call, return, conditional,
system, asynchronous, interrupt, transaction abort, trace begin, trace end, and
in transaction, respectively.

perf script also supports higher level ways to dump instruction traces:

perf script --insn-trace --xed

Dump all instructions. This requires installing the xed tool (see XED below)
Dumping all instructions in a long trace can be fairly slow. It is usually better
to start with higher level decoding, like

perf script --call-trace

or

perf script --call-ret-trace

and then select a time range of interest. The time range can then be examined
in detail with

perf script --time starttime,stoptime --insn-trace --xed

While examining the trace it's also useful to filter on specific CPUs using
the -C option

perf script --time starttime,stoptime --insn-trace --xed -C 1

Dump all instructions in time range on CPU 1.

Another interesting field that is not printed by default is 'ipc' which can be
displayed as follows:

Expand Down Expand Up @@ -1110,6 +1136,10 @@ To display PEBS events from the Intel PT trace, use the itrace 'o' option e.g.

perf script --itrace=oe

XED
---

include::build-xed.txt[]

SEE ALSO
--------
Expand Down

0 comments on commit 6556a75

Please sign in to comment.