Program analysis
Profilers are tools that analyze the dynamic
behavior of your program: how fast and how often the
parts of its code are executed.
``Analyzing run-time behavior''
discusses the lprof, prof and fprof profilers.
Profilers are tools that analyze the dynamic
It includes an overview of the profiling utilities
that describes the procedure you must follow
to profile a program with any of the following tools:
-
prof -- A time profiler
that reports the amount of time and the percentage
of time that was spent executing the parts of a program.
It also reports the number of calls to each
function and the average execution time of the calls.
-
lprof -- A line-by-line frequency profiler.
It reports how many times each
line of source code was executed.
In that way, it lets you identify the
unexecuted and most frequently executed parts of your code.
-
fprof -- A flow and time profiler.
It reports when each function was called, and when the function exited.
This information can be used for performance tuning or locality of
reference tuning.
``Browsing through your code with cscope''
contains a tutorial on the cscope browser.
The cscope browser is an interactive program
that locates specified elements of code in C, lex, or
yacc source files.
It lets you search and edit your source files more efficiently than
you could with a typical editor.
NOTE:
Use the profiling utilities to identify, and cscope
to rewrite, inefficient lines of code.
Use cscope for any other program-editing task.
Next topic:
Other tools
Previous topic:
Program debugging
© 2005 The SCO Group, Inc. All rights reserved.
SCO OpenServer Release 6.0.0 -- 02 June 2005