Manual browser: tprof(8)
|TPROF(8)||System Manager's Manual||TPROF(8)|
NAMEtprof — record tprof profiling samples
|tprof||[-c] [-o file] command ...|
DESCRIPTIONThe tprof is a sampling based profiler.
tprof utility makes the kernel driver start profiling, executes the specified command, keeps recording samples from the kernel driver until the command finishes, and reports statistics to the standard error.
The tprof pseudo driver and a suitable backend should be loaded beforehand.
The tprof utility accepts the following options.
- -o file
- Write the collected samples to the file named file. The default is “tprof.out”.
- Write the collected samples to the standard output. Note that the output is a binary stream.
EXAMPLESThe following command profiles the system during 1 second and shows the top-10 kernel functions which likely consumed CPU cycles.
tprof -c sleep 1 2>/dev/null | tpfmt -skCLP | head -10
DIAGNOSTICSThe tprof utility reports the following statistics about the activities of the tprof pseudo driver.
- The number of samples collected and prepared for userland consumption.
- The number of samples dropped because the per-CPU buffer was full.
- The number of buffers successfully prepared for userland consumption.
- The number of buffers which have been dropped because they were empty.
- The number of buffers dropped because the number of buffers kept in the kernel exceeds the limit.
- The number of samples dropped because the buffers containing the samples were dropped.
AUTHORSThe tprof utility is written by .
CAVEATSThe contents and representation of recorded samples are undocumented and will likely be changed for future releases of NetBSD in an incompatible way.
|November 26, 2011||NetBSD 7.0|