summaryrefslogtreecommitdiffstats
path: root/tools/perf/Documentation/itrace.txt
diff options
context:
space:
mode:
authorSteinar H. Gunderson <sesse@google.com>2022-03-22 09:24:52 +0100
committerArnaldo Carvalho de Melo <acme@redhat.com>2023-02-17 11:02:44 -0300
commit7e55b95651d88e60368087c243525a0d97d43d3d (patch)
tree9011e1069c510ed8655695a0dab84d09647e3a7a /tools/perf/Documentation/itrace.txt
parent1470a108a60e8c0c4d19da10117c9b98f0078654 (diff)
downloadlinux-stable-7e55b95651d88e60368087c243525a0d97d43d3d.tar.gz
linux-stable-7e55b95651d88e60368087c243525a0d97d43d3d.tar.bz2
linux-stable-7e55b95651d88e60368087c243525a0d97d43d3d.zip
perf intel-pt: Synthesize cycle events
There is no good reason why we cannot synthesize "cycle" events from Intel PT just as we can synthesize "instruction" events, in particular when CYC packets are available. This enables using PT to getting much more accurate cycle profiles than regular sampling (record -e cycles) when the work last for very short periods (<10 ms). Thus, add support for this, based off of the existing IPC calculation framework. The new option to --itrace is "y" (for cYcles), as c was taken for calls. Cycle and instruction events can be synthesized together, and are by default. The only real caveat is that CYC packets are only emitted whenever some other packet is, which in practice is when a branch instruction is encountered (and not even all branches). Thus, even at no subsampling (e.g. --itrace=y0ns), it is impossible to get more accuracy than a single basic block, and all cycles spent executing that block will get attributed to the branch instruction that ends the packet. Thus, one cannot know whether the cycles came from e.g. a specific load, a mispredicted branch, or something else. When subsampling (which is the default), the cycle events will get smeared out even more, but will still be generally useful to attribute cycle counts to functions. Reviewed-by: Adrian Hunter <adrian.hunter@intel.com> Signed-off-by: Steinar H. Gunderson <sesse@google.com> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: Ingo Molnar <mingo@redhat.com> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Peter Zijlstra <peterz@infradead.org> Link: https://lore.kernel.org/r/20220322082452.1429091-1-sesse@google.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/Documentation/itrace.txt')
-rw-r--r--tools/perf/Documentation/itrace.txt3
1 files changed, 2 insertions, 1 deletions
diff --git a/tools/perf/Documentation/itrace.txt b/tools/perf/Documentation/itrace.txt
index 0916bbfe64cb..a97f95825b14 100644
--- a/tools/perf/Documentation/itrace.txt
+++ b/tools/perf/Documentation/itrace.txt
@@ -1,4 +1,5 @@
i synthesize instructions events
+ y synthesize cycles events
b synthesize branches events (branch misses for Arm SPE)
c synthesize branches events (calls only)
r synthesize branches events (returns only)
@@ -25,7 +26,7 @@
A approximate IPC
Z prefer to ignore timestamps (so-called "timeless" decoding)
- The default is all events i.e. the same as --itrace=ibxwpe,
+ The default is all events i.e. the same as --itrace=iybxwpe,
except for perf script where it is --itrace=ce
In addition, the period (default 100000, except for perf script where it is 1)