From: Ben Peddell User-Agent: Mozilla/5.0 (X11; U; Linux i586; en-US; rv:1.1) Gecko/20020826 X-Accept-Language: en-us, en MIME-Version: 1.0 Newsgroups: comp.os.msdos.djgpp Subject: Re: gprof with all zero execution times in version 2.03 References: <200305121929 DOT h4CJTEN08938 AT delorie DOT com> <5c9be5c2 DOT 0305130628 DOT 45188bfd AT posting DOT google DOT com> <5c9be5c2 DOT 0305131309 DOT 7d688c74 AT posting DOT google DOT com> <5c9be5c2 DOT 0305141007 DOT 3e81e5d2 AT posting DOT google DOT com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Lines: 27 Message-ID: Date: Thu, 15 May 2003 17:10:17 +1000 NNTP-Posting-Host: 144.139.175.211 X-Trace: newsfeeds.bigpond.com 1052981921 144.139.175.211 (Thu, 15 May 2003 16:58:41 EST) NNTP-Posting-Date: Thu, 15 May 2003 16:58:41 EST Organization: Telstra BigPond Internet Services (http://www.bigpond.com) To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com Andre Chrcanovic wrote: > Hans-Bernhard Broeker wrote in message news:... > >>There, you did it. Unless you did that *very* carefully, this almost >>certainly is what broke the profile data collection. Gprof relies on >>standard timer ticks to do its work. > > > OK. Maybe I was not very careful... I wrote the handler based on the > information I found in the FAQ (item '18.9 How to hook hardware > interrupts'). > > Is there a way to change the timer and still have the profile to work? > Charles Sandmann mentions that "If you need your own timer routine > then you need to chain to the original timer if you want profiling by > time to work". I tried to use > '_go32_dpmi_chain_protected_mode_interrupt_vector', as described in > the 'Guide: Interrupts Overview' document, but this crashes the > program... Is the version of the document I found in DJGPP's site not > updated? I also tried the example code listed there and it also > crashes... So, you want a 5ms timer? Why not hook the RTC interrupt? It fires 1024 times a second by default, and you should be able to catch every fifth interrupt, giving a 4.88ms period.