Mail Archives: djgpp/1997/12/11/19:02:43
john bartkiw wrote:
>
> Anyone know of a tool with DKGPP which will give me code coverage
> information about a program. IE which functions get called how many times
> for how much proccessor time.
>
> I basically want to optimize my code and want to see where I'm using my
> clock cycles.
The tool you are looking for is called a profiler, and DJGPP (note
correct spelling) does indeed come with one. It's called "gprof" (for
GNU Profiler), and comes with the GNU Binutils, which are part of a
standard DJGPP installation. Basic usage of gprof:
- Compile _and_ link your program using the "-pg" option.
- Run your program for long enough to generate a sample.
- Run "gprof" on your program and capture the output.
The DJGPP FAQ (v2/faq210b.zip from SimTel or online at
http://www.delorie.com/djgpp/v2faq/) has a complete chapter devoted to
profiling. I suggest you read it.
hth
--
---------------------------------------------------------------------
| John M. Aldrich | A singer in a smoky room / Smell of |
| aka Fighteer I | wine and cheap perfume / For a smile |
| mailto:fighteer AT cs DOT com | they can share the night / It goes |
| http://www.cs.com/fighteer | on and on and on... |
---------------------------------------------------------------------
- Raw text -