[an error occurred while processing this directive]
Next:IO bound programs,
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.