Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Watcom C/C++ User's Guide - (pentium only) this option causes the compiler to generate code into the http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
(Pentium only) This option causes the compiler to generate code into the
prolog of each function to count exactly how much time is spent within that
function, in clock ticks.  This option is valid only for Pentium compatible
processors (i.e., the instructions inserted into the code do not work on 486
or earlier architectures).  The Pentium "rdtsc" opcode is used to obtain the
instruction cycle count.
At the end of the execution of the program, a file will be written to the
same location as the executable, except with a ".prf" extension.  The
contents of the file will look like this:

Example:

               1903894223          1  main
               1785232334    1376153  StageA
               1882249150      13293  StageB
               1830895850       2380  StageC
                225730118         99  StageD

The first column is the total number of clock ticks spent inside of the
function during the execution of the program, the second column is the
number of times it was called and the third column is the individual
function name.  The total number of clock ticks includes time spent within
functions called from this function.

The overhead of the profiling can be somewhat intrusive, especially for
small leaf functions (i.e., it may skew your results somewhat).

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson