.TH OPROFILE 1 "@DATE@" "oprofile @VERSION@"
.UC 4
.SH NAME
oprofile \- a system-wide profiler
.SH SYNOPSIS
.br
.B opcontrol
[
.I options
]
.br
.B opreport
[
.I options
]
[ profile specification ]
.br
.B opannotate
[
.I options
]
[ profile specification ]
.br
.B oparchive
[
.I options
]
[ profile specification ]
.br
.B opgprof
[
.I options
]
[ profile specification ]
.br
.SH DESCRIPTION
OProfile is a profiling system for systems running Linux
2.2, 2.4, and 2.6. Profiling runs transparently in the background and profile
data can be collected at any time. OProfile makes use of the hardware
performance counters provided on Intel, AMD, and other processors,
and uses a timer-interrupt based mechanism on CPUs without counters.
OProfile can profile the whole system in high detail.
.br
For a gentle guide to using OProfile, please read the HTML documentation
listed in SEE ALSO.
.br
.SH OPCONTROL
.B opcontrol
is used for starting and stopping the OProfile daemon, and providing set-up
parameters.
.SH OPREPORT
.B opreport
gives image and symbol-based profile summaries for the whole system or
a subset of binary images.
.SH OPANNOTATE
.B opannotate
can produce annotated source or mixed source and assembly output.
.SH OPARCHIVE
.B oparchive
produces oprofile archive for offline analysis
.SH OPGPROF
.B opgprof
can produce a gprof-format profile for a single binary.
.SH PROFILE SPECIFICATIONS
All of the post-profiling tools can take profile specifications,
which is some combination of the following parameters. Enclosing
part of a profile specification in curly braces { } can be used
for differential profiles with
.B opreport
; the braces
.B must
be surrounded by whitespace.
.TP
.BI "archive:"archive
Path to the archive to inspect, as generated by
.B oparchive
.br
.TP
.BI "session:"sessionlist
A comma-separated list of session names to resolve in. Absence of this
tag, unlike all others, means "the current session", equivalent to
specifying "session:current".
.br
.TP
.BI "session-exclude:"sessionlist
A comma-separated list of sessions to exclude.
.br
.TP
.BI "image:"imagelist
A comma-separated list of image names to resolve. Each entry may be relative
path, glob-style name, or full path, e.g.
opreport 'image:/usr/bin/oprofiled,*op*,./oprofpp'
.br
.TP
.BI "image-exclude:"imagelist
Same as image:, but the matching images are excluded.
.br
.TP
.BI "lib-image:"imagelist
Same as image:, but only for images that are for
a particular primary binary image (namely, an application). This only
makes sense to use if you're using --separate.
This includes kernel modules and the kernel when using
--separate=kernel.
.br
.TP
.BI "lib-image-exclude:"imagelist
Same as , but the matching images
are excluded.
.br
.TP
.BI "event:"eventname
The symbolic event name to match on, e.g. event:DATA_MEM_REFS.
.br
.TP
.BI "count:"eventcount
The event count to match on, e.g. event:DATA_MEM_REFS count:30000.
.br
.TP
.BI "unit-mask:"maskvalue
The unit mask value of the event to match on, e.g. unit-mask:1.
.br
.TP
.BI "cpu:"cpulist
Only consider profiles for the given numbered CPU (starting from zero).
This is only useful when using CPU profile separation.
.br
.TP
.BI "tgid:"pidlist
Only consider profiles for the given task groups. Unless some program is
using threads, the task group ID of a process is the same as its process
ID. This option corresponds to the POSIX notion of a thread group. This
is only useful when using per-process profile separation.
.br
.TP
.BI "tid:"tidlist
Only consider profiles for the given threads. When using recent thread
libraries, all threads in a process share the same task group ID, but
have different thread IDs. You can use this option in combination with
tgid: to restrict the results to particular threads within a process.
This is only useful when using per-process profile separation.
.SH ENVIRONMENT
No special environment variables are recognised by oprofile.
.SH FILES
.TP
.I $HOME/.oprofile/
Configuration files
.TP
.I /root/.oprofile/daemonrc
Configuration file for opcontrol
.TP
.I @prefix@/share/oprofile/
Event description files used by OProfile.
.TP
.I /var/lib/oprofile/samples/oprofiled.log
The user-space daemon logfile.
.TP
.I /var/lib/oprofile/opdev, /var/lib/oprofile/ophashmapdev, /var/lib/oprofile/opnotedev
The device files for communication with the Linux 2.4 kernel module.
.TP
.I /dev/oprofile
The device filesystem for communication with the Linux 2.6 kernel module.
.TP
.I /var/lib/oprofile/samples/
The location of the generated sample files.
.SH VERSION
.TP
This man page is current for @PACKAGE@-@VERSION@.
.SH SEE ALSO
.BR @OP_DOCDIR@,
.BR opcontrol(1),
.BR opreport(1),
.BR opannotate(1),
.BR oparchive(1),
.BR opgprof(1),
.BR gprof(1),
.BR readprofile(1),
.BR "CPU vendor architecture manuals"
.SH COPYRIGHT
oprofile is Copyright (C) 1998-2004 University of Manchester, UK, John Levon,
and others.
OProfile is released under the GNU General Public License, Version 2,
or (at your option) any later version.
.SH AUTHORS
John Levon is the primary author. See the documentation
for other contributors.