doc/man: remove lttng.1 (built from lttng.1.txt)
[lttng-tools.git] / doc / man / lttng-calibrate.1.txt
CommitLineData
89dbeff8
PP
1lttng-calibrate(1)
2==================
3
4
5NAME
6----
7lttng-calibrate - Quantify LTTng overhead
8
9
10SYNOPSIS
11--------
12[verse]
13*lttng* ['GENERAL OPTIONS'] *calibrate*
14
15
16DESCRIPTION
17-----------
18The `lttng calibrate` commands quantifies the overhead of LTTng tracers.
19
20The `lttng calibrate` command can be used to find out the combined
21average overhead of the LTTng tracers and the instrumentation mechanisms
22used. This overhead can be calibrated in terms of time or using any of
23the PMU performance counter available on the system.
24
25For now, the only implemented calibration is the Linux kernel function
26instrumentation (_kretprobes_).
27
28
29Calibrate Linux kernel function instrumentation
30~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
31
32As an example, we use an i7 processor with 4 general-purpose PMU
33registers. This information is available by issuing `dmesg`, looking
34for `generic registers`.
35
36The following sequence of commands gathers a trace executing a kretprobe
37hooked on an empty function, gathering PMU counters LLC
38(Last Level Cache) misses information (use `lttng add-context --list` to
39get the list of available PMU counters).
40
41------------------------------------------------------------------------
42lttng create calibrate-function
43lttng enable-event calibrate --kernel \
44 --function=lttng_calibrate_kretprobe
45lttng add-context --kernel --type=perf:cpu:LLC-load-misses \
46 --type=perf:cpu:LLC-store-misses \
47 --type=perf:cpu:LLC-prefetch-misses
48lttng start
49
50for a in $(seq 1 10); do
51 lttng calibrate --kernel --function
52done
53
54lttng destroy
55babeltrace $(ls -1drt ~/lttng-traces/calibrate-function-* | tail -n 1)
56------------------------------------------------------------------------
57
58The output from linklttng:babeltrace(1) can be saved to a text file and
59opened in a spreadsheet (for example, in LibreOffice) to focus on the
60per-PMU counter delta between consecutive `calibrate_entry` and
61`calibrate_return` events. Note that these counters are per-CPU, so
62scheduling events would need to be present to account for migration
63between CPUs. Therefore, for calibration purposes, only events staying
64on the same CPU must be considered.
65
66Here's an example of the average result, for the i7, on 10 samples:
67
68[width="40%",options="header"]
69|=============================================================
70| PMU counter | Average | Standard deviation
71| `perf_LLC_load_misses` | 5.0 | 0.577
72| `perf_LLC_store_misses` | 1.6 | 0.516
73| `perf_LLC_prefetch_misses` | 9.0 | 14.742
74|=============================================================
75
76As we can notice, the load and store misses are relatively stable across
77runs (their standard deviation is relatively low) compared to the
78prefetch misses. We could conclude from this information that LLC load
79and store misses can be accounted for quite precisely, but prefetches
80within a function seems to behave too erratically (not much causality
81link between the code executed and the CPU prefetch activity) to be
82accounted for.
83
84
85include::common-cmd-options-head.txt[]
86
87
88Domain
89~~~~~~
90One of:
91
92option:-k, option:--kernel::
93 Quantify LTTng overhead in the Linux kernel domain.
94
95option:-u, option:--userspace::
96 Quantify LTTng overhead in the user space domain.
97
98
99Calibration
100~~~~~~~~~~~
101option:--function::
102 Use dynamic function entry/return probes to calibrate (default).
103+
104This option requires the option:--kernel option.
105
106
107include::common-cmd-help-options.txt[]
108
109
110include::common-cmd-footer.txt[]
111
112
113SEE ALSO
114--------
115linklttng:lttng(1)
This page took 0.027486 seconds and 4 git commands to generate.