From: "Ed Wallace" Organization: Northrop Grumman ESSD To: djgpp AT delorie DOT com Date: Fri, 24 Oct 1997 08:31:38 EDT Subject: profiler in gcc Message-ID: <180A294BC6@ami1.md.essd.northgrum.com> Precedence: bulk There is a profiler built into the compiler. Just compile and link with the -pg switch and run the program. This creates a profile history in a file called gmon.out. Then run gprof with your program and gmon.out as parameters to create a profile. gprof -z -b prog.exe gmon.out > savefile It is also possible to get a profile that lists every branch in your code by using the -a switch which creates a file called bb.out. Note however that you need the latest version of the libcc.a for the -a switch to work. (Hint: if you don't get a bb.out file its the wrong version).