Skip to content

Commit 6556a75

Browse files
Andi Kleenacmel
authored andcommitted
perf intel-pt: Improve PT documentation slightly
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>
1 parent 0997a26 commit 6556a75

1 file changed

Lines changed: 30 additions & 0 deletions

File tree

‎tools/perf/Documentation/perf-intel-pt.txt‎

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,32 @@ The flags are "bcrosyiABEx" which stand for branch, call, return, conditional,
112112
system, asynchronous, interrupt, transaction abort, trace begin, trace end, and
113113
in transaction, respectively.
114114

115+
perf script also supports higher level ways to dump instruction traces:
116+
117+
perf script --insn-trace --xed
118+
119+
Dump all instructions. This requires installing the xed tool (see XED below)
120+
Dumping all instructions in a long trace can be fairly slow. It is usually better
121+
to start with higher level decoding, like
122+
123+
perf script --call-trace
124+
125+
or
126+
127+
perf script --call-ret-trace
128+
129+
and then select a time range of interest. The time range can then be examined
130+
in detail with
131+
132+
perf script --time starttime,stoptime --insn-trace --xed
133+
134+
While examining the trace it's also useful to filter on specific CPUs using
135+
the -C option
136+
137+
perf script --time starttime,stoptime --insn-trace --xed -C 1
138+
139+
Dump all instructions in time range on CPU 1.
140+
115141
Another interesting field that is not printed by default is 'ipc' which can be
116142
displayed as follows:
117143

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

11111137
perf script --itrace=oe
11121138

1139+
XED
1140+
---
1141+
1142+
include::build-xed.txt[]
11131143

11141144
SEE ALSO
11151145
--------

0 commit comments

Comments
 (0)