forked from Atlantic777/pmu-tools
-
Notifications
You must be signed in to change notification settings - Fork 0
/
toplev.man
127 lines (126 loc) · 3.48 KB
/
toplev.man
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.43.3.
.TH TOPLEV.PY "1" "October 2014" "toplev.py toplev" "User Commands"
.SH NAME
toplev.py \- manual page for toplev.py toplev
.SH DESCRIPTION
usage: toplev [options] perf\-arguments
.PP
Do cycle decomposition on a workload: estimate on which part of the
CPU pipeline it bottlenecks. The bottlenecks are expressed as a tree
with different levels.
.PP
Requires an Intel Sandy, Ivy Bridge, Haswell CPU.
It works best on Ivy Bridge currently.
On Sandy Bridge Server use Sandy Bridge (FORCECPU=snb)
.SH EXAMPLES
\&./toplev.py \-l2 program
measure program in level 2
.PP
\&./toplev.py \-a sleep X
measure whole system for X seconds
.PP
\&./toplev.py \-o logfile.csv \-x, \-p PID
measure pid PID, outputting in CSV format
.SS "optional arguments:"
.TP
\-h, \-\-help
show this help message and exit
.TP
\-\-verbose, \-v
Print all results even when below threshold
.TP
\-\-force
Force potentially broken configurations
.TP
\-\-kernel
Only measure kernel code
.TP
\-\-user
Only measure user code
.TP
\-\-print\-group, \-g
Print event group assignments
.TP
\-\-no\-desc
Don't print event descriptions
.TP
\-\-csv CSV, \-x CSV
Enable CSV mode with specified delimeter
.TP
\-\-interval INTERVAL, \-I INTERVAL
Enable interval mode with ms interval
.TP
\-\-output OUTPUT, \-o OUTPUT
Set output file
.TP
\-\-graph
Automatically graph interval output with tl\-barplot.py
.TP
\-\-title TITLE
Set title of graph
.TP
\-\-xkcd
Use xkcd plotting mode for graph
.TP
\-\-level LEVEL, \-l LEVEL
Measure upto level N (max 5)
.TP
\-\-metrics, \-m
Print extra metrics
.TP
\-\-sample, \-S
Suggest commands to sample for bottlenecks
(experimential)
.TP
\-\-raw, \-r
Print raw values
.TP
\-\-no\-group
Dont use groups
.TP
\-\-no\-multiplex
Do not multiplex, but run the workload multiple times
as needed. Requires reproducible workloads.
.TP
\-\-power
Display power metrics
.PP
Other perf arguments allowed (see the perf documentation)
After \-\- perf arguments conflicting with toplev can be used.
.PP
Some caveats:
.PP
The lower levels of the measurement tree are less reliable
than the higher levels. They also rely on counter multi\-plexing,
and can not run each equation in a single group, which can cause larger
measurement errors with non steady state workloads
.PP
(If you don't understand this terminology; it means measurements
in higher levels are less accurate and it works best with programs that primarily
do the same thing over and over)
.PP
In this case it's recommended to measure the program only after
the startup phase by profiling globally or attaching later.
level 1 or running without \-d is generally the most reliable.
.PP
If the program is very reproducible \-\- such as a simple kernel \-\-
it is also possible to use \-\-no\-multiplex. In this case the
workload is rerun multiple times until all data is collected.
Do not use together with sleep.
.PP
One of the events (even used by level 1) requires a recent enough
kernel that understands its counter constraints. 3.10+ is safe.
.PP
Various older kernels (such as 2.6.32) can not schedule all groups
used by toplev correctly. In this case use \-\-no\-group (may cause
additional measurement errors)
.PP
In Hyper Threading mode toplev defaults to measuring the whole
system.
.PP
Recent kernels do not allow all events needed by level 3 or larger
in Hyper Threading mode due to a bug workaround. If that is needed
please see the github site for a kernel patch.
.PP
Other CPUs can be forced with FORCECPU=name
Valid CPU names: snb jkt ivb ivt hsw hsx slm