[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: gprof reporting zero times for one program

From: Nick Clifton
Subject: Re: gprof reporting zero times for one program
Date: Mon, 28 Jan 2008 17:27:33 +0000
User-agent: Thunderbird (X11/20071018)

Hi David,

The only change other than the use of multiple files, instead of
just one,

Having multiple source files rather than just one definitely should not be causing this.

that I can think of which might be causing this
is that the new version of nettee calls alarm(0) and alarm(time)
more frequently than did the previous version. If gprof embeds code
which uses the same mechanism it might never be seeing its timers going

Hmm, well profiling support is implementation specific, so you may be on to something here. What typically happens when profiling is enabled is that the compiler inserts a call to a special function called __mcount() which takes place during the prologue of every compiled function. __mcount records which function is being called (based on the PC) and the time the call was made, based presumably on a timer/clock reading of some sort. When the program exits special code in the exit handler formats and dumps this information into the gmon.out file.

So if you are manipulating the timer/clock then maybe this could be the cause of the problem. Can you try suppressing just that code temporarily to see if this restores proper profiling ?

If that does not work or cannot be done easily, can you post a gmon.out file for us to look at. (Compressed of course). I suspect that you have a compiler and/or C library problem here rather than a broken gprof which is refusing to read a proper gmon.out file, but it never hurts to be sure.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]