HP Caliper Ktrace Features Guide

Table 2-1 ktracer options (continued)
DescriptionOption
Add the specified function to the list of functions to trace.
You can specify the function by name or by hexadecimal or decimal address.
Multiple -a options can be specified on a command line.
-a func
Add all functions from the module named modname (default vmunix) that
match the egrep pattern func_pattern to the traced function list. See egrep(1)
and regexp(5). The following example adds all the kernel functions whose
names start with "vx_" plus all whose names end with "wait":
# ktracer -e "^vx_" -e "wait$"
-e
[modname:]func_pattern
Trace functions in the specified library or object file.
The library argument can be a path name, or the basename of a library in
/usr/conf/lib. Multiple -l options are accepted. For example:
ktracer -l /usr/conf/lib/libnfs.a -l libsync.a -l file.o
-B
-l library
Trace functions in the specified module or object file.
The module argument can be a path name, or the basename of a module in
/usr/conf/mod. Multiple -m options are accepted. For example:
ktracer -m /usr/conf/mod/cdfs -m rng -B
-m module
Remove the specified function from the traced function list.
The func argument can be a function name or hexadecimal or decimal address.
Removing a function that is not on the list has no effect.
-r func
Stop tracing when this function is encountered. For example:
ktracer-S panic -B
If and when the panic() function is called and after ktracer collects a
trace record for the panic() function call, ktracer stops collecting further
traces.
-S func
Installing the Function List
Insert a trace point at the entry of each and every function in the list of kernel
functions to trace. Inserting trace points is known as “installing the function
list.” When the kernel encounteres a trace point, the kernel branches to the
tracing code.
The command line options -a, -S, -r, and -z configure the list of kernel
functions to trace. When -I is run, the entry point of each function in the list
is modified to branch to kernel tracing code.
ktracer is ready and set to trace as soon as you use the —b option.
ktracer -t (status) will show "Funcs NOT installed" when no trace points
are inserted and will show "Funcs INSTALLED" when trace points are inserted
for each function.
-I
Options 21