From: Charles Sandmann Newsgroups: comp.os.msdos.djgpp Subject: Re: gprof with all zero execution times in version 2.03 Date: Tue, 13 May 2003 17:31:20 CDT Organization: Rice University, Houston, TX Lines: 18 Message-ID: <3ec17238.sandmann@clio.rice.edu> References: <5c9be5c2 DOT 0305131309 DOT 7d688c74 AT posting DOT google DOT com> NNTP-Posting-Host: clio.rice.edu X-Trace: joe.rice.edu 1052865461 18951 128.42.105.3 (13 May 2003 22:37:41 GMT) X-Complaints-To: abuse AT rice DOT edu NNTP-Posting-Date: Tue, 13 May 2003 22:37:41 +0000 (UTC) X-NewsEditor: ED-1.5.9 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com > Regarding the timers, I change the PC timer and have my own timer > interrupt routine. I need a 5 ms interrupt to scan telephony > hardware... The timer profiling depends on getting timer interrupts which it uses to create exceptions on the next memory access so it can capture the EIP. If you need your own timer routine then you need to chain to the original timer if you want profiling by time to work. You could chain each 5 ms tic if you wanted to, which would give more samples. You also should make sure your interrupt routine uses _ds_alias to prevent from being killed by the profiler. If your code requires CWSDPR0 you must be using ring-0 prived instructions; I'm pleasantly surprised that profiling works at all under CWSDPR0 - I don't think I ever tested it or planned for it to work.