|
|
The chapter is organized as follows:
The CPPT package consists of two tools: cscope, a browser, and lprof, a profiler.
The cscope(CP) browser is an interactive program that locates specified parts of code in a set of C source files and allows you to edit the files. It can reduce significantly the amount of time you must spend searching for functions, function calls, macros, and variables in the code. It is especially helpful for a programmer working on unfamiliar code.
A profiler is a tool for analyzing a program's run-time behavior, a procedure known as dynamic analysis. The lprof(CP) tool allows a programmer or tester to identify those parts of the source code that are most often executed and those that are never executed when a program is run. It provides line by line frequency profiling, reporting how many times each line of source code is executed. You can request test coverage analysis so that lprof only reports which lines of code are not executed at run time. lprof can be used over a set of tests such as a test suite.