Kitrace

Kitrace is an operating-system tracing package developed by Geoff Kuenning. Unlike most other trace packages, kitrace allows the experimenter to set and change tracepoints dynamically, and allows precise measurements of the time taken by various operating-system activities. For example, a researcher might use kitrace to examine the behavior of the sync system call on a SPARCstation IPC:

(kitrace) trace sync PID sync+50 REG g1
(kitrace) print
_sync    10:33:36.342703 (        ) pid 7759
_sync+50 10:33:36.342803 (0.000100) g1=f80a2424 (_spec_sync)
_sync+50 10:33:36.400674 (0.057871) g1=f80beb90 (_ufs_sync)
_sync+50 10:33:38.117703 (1.717029) g1=f802ad28 (_nfs_sync)
_sync+50 10:33:38.135095 (0.017392) g1=f80922e0 (_rf_sync)
_sync+50 10:33:38.135175 (0.000080) g1=f80a8b04 (_tmp_sync)
_sync+50 10:33:38.135221 (0.000046) g1=f8008e18 (_hsfs_sync)
_sync+50 10:33:38.135266 (0.000045) g1=f80e0540 (_null_sync)
_sync+50 10:33:38.135375 (0.000109) g1=f80f47f0 (_flfs_sync)
_sync+50 10:33:38.135422 (0.000047) g1=f810f484 (_fpfs_sync)
...
_sync+50 10:33:38.135563 (0.000047) g1=f811a51c (_umap_sync)
_sync+50 10:33:38.135615 (0.000052) g1=f80e29fc (_select_sync)

The first two lines show the commands given interactively to set up tracing (we assume a short delay between the two, to give time for a sync to be executed). The remaining lines show part of the output, which includes labels, timestamps and time differences, captured registers and process ID's, and symbolic information. All of this is under control of the experimenter.

Kitrace for SunOS 4.1.1 is available for ftp in source and binary form. There are also sources for Linux 2.0 and later (x86 only, at the moment). Untar this file in the root of your Linux kernel tree. This will create a subdirectory named "kitrace", which contains a README file with further instructions.

As mentioned in the README file on the ftp site, please let me (geoff@cs.hmc.edu) know if you port kitrace to any other architectures.


Kitrace is described in detail in:

G. H. Kuenning, Precise Interactive Measurement of Operating Systems Kernels, Software--Practice and Experience 25, 1 (January 1995), 1--22.

Due to copyright restrictions, it is not currently possible to make this paper available for ftp. However, interested parties may contact me for information about obtaining reprints.

Geoff Kuenning's home page.

This page maintained by

Geoff Kuenning.