www.delorie.com/djgpp/v2faq/faq13_3.html   search  
Node:Garbled profile, Next:, Previous:Profiled crash, Up:Profiling

13.3 Gprof produces garbled profile

Q: Whenever I compile my programs with -pg, the profile produced by 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 setitimer and 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 it, and Gprof will show reasonable results.



  webmaster   donations   bookstore     delorie software   privacy  
  Copyright © 2001   by Eli Zaretskii     Updated Apr 2001  

Please take a moment to fill out this visitor survey
You can help support this site by visiting the advertisers that sponsor it! (only once each, though)