* [PATCH] perf: Improve PT documentation slightly
@ 2020-10-14 3:53 Andi Kleen
2020-10-14 16:15 ` Arnaldo Carvalho de Melo
0 siblings, 1 reply; 2+ messages in thread
From: Andi Kleen @ 2020-10-14 3:53 UTC (permalink / raw)
To: acme; +Cc: linux-kernel, jolsa, Andi Kleen, adrian.hunter, Andi Kleen
Document the higher level --insn-trace etc. perf script options.
Include the howto how to build xed into the manpage
Cc: adrian.hunter@intel.com
Signed-off-by: Andi Kleen <ak@linux.intel.com>
---
tools/perf/Documentation/perf-intel-pt.txt | 30 ++++++++++++++++++++++
1 file changed, 30 insertions(+)
diff --git a/tools/perf/Documentation/perf-intel-pt.txt b/tools/perf/Documentation/perf-intel-pt.txt
index d5a266d7f15b..cc2a8b2be31a 100644
--- a/tools/perf/Documentation/perf-intel-pt.txt
+++ b/tools/perf/Documentation/perf-intel-pt.txt
@@ -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:
@@ -1093,6 +1119,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
--------
--
2.28.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] perf: Improve PT documentation slightly
2020-10-14 3:53 [PATCH] perf: Improve PT documentation slightly Andi Kleen
@ 2020-10-14 16:15 ` Arnaldo Carvalho de Melo
0 siblings, 0 replies; 2+ messages in thread
From: Arnaldo Carvalho de Melo @ 2020-10-14 16:15 UTC (permalink / raw)
To: Andi Kleen; +Cc: linux-kernel, jolsa, adrian.hunter, Andi Kleen
Em Tue, Oct 13, 2020 at 08:53:46PM -0700, Andi Kleen escreveu:
> Document the higher level --insn-trace etc. perf script options.
>
> Include the howto how to build xed into the manpage
Thanks, applied.
> Cc: adrian.hunter@intel.com
> Signed-off-by: Andi Kleen <ak@linux.intel.com>
> ---
> tools/perf/Documentation/perf-intel-pt.txt | 30 ++++++++++++++++++++++
> 1 file changed, 30 insertions(+)
>
> diff --git a/tools/perf/Documentation/perf-intel-pt.txt b/tools/perf/Documentation/perf-intel-pt.txt
> index d5a266d7f15b..cc2a8b2be31a 100644
> --- a/tools/perf/Documentation/perf-intel-pt.txt
> +++ b/tools/perf/Documentation/perf-intel-pt.txt
> @@ -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:
>
> @@ -1093,6 +1119,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
> --------
> --
> 2.28.0
>
--
- Arnaldo
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-10-14 16:15 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-14 3:53 [PATCH] perf: Improve PT documentation slightly Andi Kleen
2020-10-14 16:15 ` Arnaldo Carvalho de Melo
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).