Kperfmon (Kernel Performance Monitor)


High-level (presumably with a GUI) clients that interact with the user and talk to the lower-level component (kerninstd) to perform kernel instrumentation. These clients are linked to the KerninstAPI library (libkerninstapi), an application programming interface that abstracts all interaction with kerninstd and provides an easy to use set of C++ classes for writing high-level instrumentation code. Presently, there is one such client, kperfmon, which is shown above. Kperfmon includes a Paradyn-style whereAxis (the 'Kernel Code' frame) that displays kernel modules, functions within modules, and basic blocks within functions. There is also a 'Metrics' frame, which shows the available performance metrics that can be applied to any items selected in the 'Kernel Code' frame. Performance data for the selected metrics and code focuses can be viewed by clicking 'Start a Visi' and selecting one of the three visualizations (Histogram, Barchart, or Table).


The two buttons in the kperfmon window under the label 'Disassemble Selected Fn/BasicBlock' will disassemble every function or basic block that is presently selected in the 'Kernel Code' tree. The disassembly window shows, on each line, the instruction s address, its raw bit value, and its disassembly. Calls to fixed-addresses (i.e., excluding calls via a register) will have the callee s name as the title of a pull-down menu that will allow the callee to be disassembled, selected, and unselected, respectively. To the left of each instruction are two + buttons, which when clicked on, will give a live register analysis for this instruction. Clicking on the left most button will show which registers kerninstd thinks are killed (and thus are available for scratch usage by instrumentation code), and which are potentially holding live values. Often, there are a pair of killed/made live lines; this indicates two different Sparc register windows. Clicking on the right most + button will show a live register analysis for this instruction in isolation.



For more information see the KernInst User's Guide