Q: Whenever I compile my programs with
-pg, the profile
Gprof shows that 100% of the run time is spent in
a single function, and the rest of the code gets 0% of time. Huh??
A: This is due to a bug in the library shipped with DJGPP v2.02:
the module which handles timers works incorrectly. (The same bug is
responsible for problems with library functions
alarm.) The solution is to upgrade to DJGPP v2.03 where these
bugs are solved. Relink your program with the v2.03 library, then rerun
Gprof will show reasonable results.
|webmaster donations bookstore||delorie software privacy|
|Copyright © 2001 by Eli Zaretskii||Updated Apr 2001|