kernprof - special executable for SpeedShop performance measurements on
the unix kernel
ssrun -experiment kernprof [ experiment-options ]
The kernprof executable allows kernel profiling information to be
gathered. To use it, use the ssrun(1) command on the kernprof
executable, specifying any of the experiments that are supported for the
kernel. These experiments will generate a SpeedShop experiment named
The experiments describe themselves as being run on the program "/unix",
and prof(1) can be used to process the data; the filename of the actual
kernel for which the data was collected must to be explicitly passed as a
command-line argument to prof.
In the current release, the only supported experiment is usertime.
Additionally, only systems running IRIX 6.4 or later may be profiled in
this manner. See profiler(1M) for a description of a PC-style profiling
which is supported on all versions of IRIX.
USERTIME - CALLSTACK PROFILING
usertime experiments may be run on the machine being profiled or any
machine that can be reached via the network. Additionally, the kernel on
the machine being profiled must have its symbol table loaded via prfld(1)
and have stack profiling enabled via prfstat(1). Finally, the rtmond(1M)
daemon must be running on the target machine in order for the usertime
data to be collected (rtmond may be run either by chkconfig(1M)'ing it on
or by running it manually as root):
On the machine (alpha) being profiled:
alpha# prfld <kernel-file>
alpha# prfstat stack
On the machine (beta) where kernel usertime data is being collected:
beta% ssrun -usertime /usr/bin/kernprof -t 5 -p 0 alpha
beta% prof -gprof <kernel-file> kernprof.usertime.<pid>.cpu0
The above example loads the symbol table of the kernel into the kernel
running on machine alpha, enables stack profiling, and starts up rtmond
(assuming that it wasn't chkconfig'ed on). On machine beta the kernprof
executable is used to collect 5 seconds worth of data from CPU 0 on
machine alpha. Once the data is collected prof(1) is used to analyze and
display the results.
The command-line options needed to run kernel usertime profiling are:
Specifies that count stack samples should be collected for each CPU
being profiled. Since stack samples are generated once a
millisecond, this corresponds to about count/1000 seconds ...
Specifies which CPUs are to be profiled. The syntax of cpu-list is
a series of comma separated CPU specifications. Each specification
is either a single CPU number or a range of CPU numbers separated by
a hyphen (-) with CPU numbers being counted from 0. E.g. ``-p 0-
3,7'' specifies that CPUs 0 through 3 and CPU 7 should be profiled.
Specifies that kernprof should run at real-time priority schedpri.
A value of 0 will result in normal time-sharing priority. By
default kernprof runs at the same priority as rtmond. If kernprof
is run by someone other the super user, the attempt to set real-time
priority scheduling will result in a harmless warning.
Specifies that stack samples should be collected for timeout
Specifies the host to collect data from. The default is localhost.
-f rtmon-file ... Specifies one or more raw rtmon data
files to be copied to equivalent SpeedShop format files (see rtmon-
client(1)). This option may not be used with the -p cpu-list or -t
timeout options. If the -c count option is specified, only the
first count stack samples will be translated.
speedshop(1), ssrun(1), prof(1), profiler(1), rtmond(1M), rtmon-client(1)
PPPPaaaaggggeeee 2222 [ Back ]