next up previous
Next: gprof and gcov support Up: Kernel development Previous: Kernel development

Profiling and coverage analysis

Since UML is a fairly normal set of processes, it is also possible to do profiling and test coverage analysis on it using the standard GNU tools, gprof and gcov. Support for them are part of the UML kernel configuration process. Once support is configured, using the tools is exactly the same as with any other process. In both cases, after the kernel is booted, tests run, and the kernel is halted, files are written out which are analyzed by the appropriate tool. The gprof runtime library writes out the standard gmon.out file, which is analyzed by gprof, while the gcov runtime writes out a set of hit counts for each file in the kernel which is used by gcov to produce an annotated listing of the file showing how many times each line was executed and which were not executed at all.

Jeff Dike 2001-05-04