Date: Mon, 16 Dec 1996 17:28:12 +0200 (IST) From: Eli Zaretskii To: "John M. Aldrich" cc: j DOT potman AT student DOT utwente DOT nl, djgpp AT delorie DOT com Subject: Re: program with profiling info runs slower with DJGPP 2.01 In-Reply-To: <32B0C83E.221@cs.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII On Thu, 12 Dec 1996, John M. Aldrich wrote: > Profiling ALWAYS makes your program run slower - there's a tremendous > amount of overhead involved in detecting each and every function call > and storing the data. It doesn't matter whether it's on v2.00 or v2.01. AFAIK, this is plain wrong. Profiling in DJGPP works by hooking the timer interrupt and recording the profilee CS:EIP. The only overhead this incurs is the additional mode switch when the timer ticks, which ain't much at 18 tics/sec. All the other processing (computing the function from the EIP) happens off-line, when `gprof' processes the file written by the profiled program.