Profiling overview

Profiling helps you determine in what sections of your code themost time is being spent executing. Profiling is only of use for very compute intensiveapplications. If an operation takes seconds to execute then you may want to profilethe application, or that portion of the application. While disk based applicationcan take seconds, maybe minutes, to execute a function this is primarily due to thefact that the code is bound to the performance of the I/O subsystem, which is veryslow compared to the processor and memory.

You need to have debug information in your executable for anyprofiler to be able to give source line number and procedure names in the profileanalysis. You want to have both Line number and Debug symbols debug informationincluded in your program. For profiling you will want to set the Make debuggableoption to No. Normally you want to leave this option to Yes to make full debuggingpossible, however in this case we want the option set to No. This is because theMake debuggable option disables certain compiler optimizations when the Debug symbolsoption is set to Yes.

For profiling you should set the following global compiler options

Line numbers = Yes
Debug symbols = Yes
Make debuggable = No

Do not forget that the linker should also include the debug information.This is done automatically when you use the Debug selected or default menu item.Otherwise you need to set the linker Include debug option manually.

Even if a module was not compiled with debug information it willalways show up in the Module view of the analyzer. This is because module informationis not created by the compiler. The linker creates this information. In fact if amodule is compiled to a LIB file each procedure will show up in the module view. Because of this if you want a percentage of time for a module you should notcompile the module to a LIB file.