trace – kernel tracing device.|
bind #T /dev /dev/trace /dev/tracectl|
The trace device provides a method for kernel tracing. Sections
of memory (“traces”) are selected; trace events will be recorded
whenever the program counter enters or leaves a function within
those sections of memory. This is useful in examining how many
times a function is called, with what arguments, and
how much time is spent in that function.
stop turns off tracing.
trace startaddr endaddr new name
trace name offdisables the specified trace. No "hits" will ever occur.
eventtype PC timestamp caller–PID arg1 arg2 arg3 arg4
To record all calls to a function residing in memory between 0xffffffff8016c2c6
and 0xffffffff8016c306 over the course of one second:|
|When creating a new trace with the 'new' command, the specified trace name cannot exist, the start address must be less than the end address, and both addresses must be greater than KTZERO and less than etext. For the 'on', 'off', and 'remove' commands, the specified trace must exist or an error will occur.|
8l(1), kprof(3), prof(1)|