Diff of /doc/operf.1.in [000000] .. [6893b5] Maximize Restore

  Switch to unified view

a b/doc/operf.1.in
1
.\" Manpage for operf
2
.\" Author: Breno Leitao <brenohl@br.ibm.com>
3
.\" Modifications: Maynard Johnson <maynardj@us.ibm.com>
4
.TH OPERF 1 "@DATE@" "oprofile @VERSION@"
5
.SH NAME
6
operf \- Performance profiler tool for Linux
7
8
.SH SYNOPSIS
9
.B operf
10
[
11
.I options
12
]
13
[ --system-wide | --pid <pid> | [ command [ args ] ] ]
14
15
.SH DESCRIPTION
16
Operf is an OProfile tool that can be used in place of opcontrol for profiling. Operf
17
uses the Linux Performance Events Subsystem, and hence, does not require the use of
18
the opcontrol daemon -- in fact, operf and opcontrol usage are mutually exclusive.
19
.P
20
By default, operf uses <current_dir>/oprofile_data as the session-dir and stores profiling data there.
21
You can change this by way of the
22
.I --session-dir
23
option.
24
.P
25
The usual post-profiling analysis tools such as
26
.BI opreport(1)
27
and
28
.BI opannotate(1)
29
can be used to generate profile reports.  The post-processing analysis tools will search for samples in
30
.I <current_dir>/oprofile_data
31
first; then, if no samples found there, they will look in /var/lib/oprofile.
32
.P
33
Statistics, such as total samples received
34
and lost samples, are written to the operf.log file that can be found in the
35
<session_dir>/samples directory.
36
.br
37
38
.SH OPTIONS
39
.TP
40
.BI command
41
The command or application to be profiled.
42
.I args
43
are the input arguments that the command or application requires.  Either
44
.I command
45
,
46
.I --pid
47
or
48
.I --system-wide
49
is required, but
50
.B cannot
51
be used simultaneously.
52
.br
53
.TP
54
.BI "--pid / -p " PID
55
This option enables operf to profile a running application.
56
.I PID
57
should be the process ID of the process you wish to profile.  When
58
finished profiling (e.g., when the profiled process ends), press
59
Ctrl-c to stop operf.
60
.br
61
.TP
62
.BI "--system-wide / -s"
63
This option is for performing a system-wide profile.  You must
64
have root authority to run operf in this mode.  When finished profiling,
65
Ctrl-c to stop operf. If you run
66
.BI operf
67
.BI --system-wide
68
as a background job (i.e., with the &), you
69
.B must
70
stop it in a controlled manner in order for it to process the profile
71
data it has collected.  Use
72
.BI kill
73
.BI -SIGINT
74
.BI <operf-PID>
75
for this purpose.
76
It is recommended
77
that when running operf with this option, the user's current working
78
directory should be /root or a subdirectory of /root to avoid
79
storing sample data files in locations accessible by regular users.
80
.br
81
.TP
82
.BI "--vmlinux / k " vmlinux_path
83
A vmlinux file that matches the running kernel that has symbol and/or debuginfo.
84
Kernel samples will be attributed to this binary, allowing post-processing tools
85
(like opreport) to attribute samples to the appropriate kernel symbols.
86
.TP
87
.BI "--callgraph / -g"
88
This option enables the callgraph to be saved during profiling. NOTE: The
89
full callchain is recorded, so there is no depth limit.
90
.br
91
.TP
92
.BI "--append / -a"
93
By default,
94
.I operf
95
moves old profile data from <session_dir>/samples/current to
96
<session_dir>/samples/previous.  If a 'previous' profile already existed,
97
it will be replaced.  If the
98
.I --append
99
option is passed, old profile data is left in place and new profile data will
100
be added to it, and the 'previous' profile (if one existed) will remain untouched.
101
To access the 'previous' profile, simply add a session specification to the normal
102
invocation of oprofile post-processing tools.  For example:
103
.br
104
.BI "   opreport"
105
.BI session:previous
106
.br
107
.TP
108
.BI "--events / -e " event1[,event2[,...]]
109
This option is for passing a comma-separated list of event specifications
110
for profiling. Each event spec is of the form:
111
.br
112
.I "   name:count[:unitmask[:kernel[:user]]]"
113
.br
114
When no event specification is given, the default event for the running
115
processor type will be used for profiling.  Use
116
.BI ophelp
117
to list the available events for your processor type.
118
.br
119
.TP
120
.BI "--separate-thread / -t"
121
This option categorizes samples by thread group ID (tgid) and thread ID (tid).
122
The '--separate-thread' option is useful for seeing per-thread samples in
123
multi-threaded applications.  When used in conjuction with the '--system-wide'
124
option, the '--separate-thread' option is also useful for seeing per-process
125
(i.e., per-thread group) samples for the case where multiple processes are
126
executing the same program during a profiling run.
127
.br
128
.TP
129
.BI "--separate-cpu / -c"
130
This option categorizes samples by cpu.
131
.br
132
.TP
133
.BI "--session-dir / -d " path
134
This option specifies the session path to hold the sample data. If not specified,
135
the data is saved in the
136
.I oprofile_data
137
directory on the current path.
138
.br
139
.TP
140
.BI "--verbose / -V " level
141
A comma-separated list of debugging control values, used to increase the verbosity of the output.
142
Valid values are:  debug, perf_events, misc, sfile, arcs, or the special value, 'all'.
143
.br
144
.TP
145
.BI "--version / -v"
146
Show operf version.
147
.br
148
.TP
149
.BI "--help / -h"
150
Show a help message.
151
.br
152
.TP
153
.BI "--usage / -u"
154
Display brief usage message.
155
.br
156
157
.SH EXAMPLE
158
$ operf make
159
160
.SH VERSION
161
This man page is current for @PACKAGE@-@VERSION@.
162
163
.SH SEE ALSO
164
opreport(1), opannotate(1).
165
166
.SH BUGS
167
Some parameters are still under development.