comp.lang.ada
 help / color / mirror / Atom feed
From: Jeff Creem <jcreem@yahoo.com>
Subject: Re: Profiling GNAT programs with gprof
Date: Wed, 08 Jun 2005 07:31:26 -0400
Date: 2005-06-08T07:31:26-04:00	[thread overview]
Message-ID: <OP-dnQ6iN_iUSjvfRVn-vg@comcast.com> (raw)
In-Reply-To: <hc668d.0n9.ln@hunter.axlog.fr>

Jean-Pierre Rosen wrote:
> Marius Amado Alves a �crit :
> 
>> I also have experienced erroneous Gprof results. Functions *never* 
>> called listed as called. I gave up on Gprof. Sorry not being of help. 
>> Just telling my experience. Next time I need profiling I think I'll 
>> try another tool e.g. RootCause, or instrument my code. Good luck to 
>> you with Gprof.
>>
> I had obviously wrong results with gprof both with tasking and 
> non-tasking programs, and I gave up using it.
> 
> <PLUG>
> Note that if you just want to time some procedure calls (not full 
> profiling), you can use the facilities from Debug.Timing package, 
> available as part of Adalog's Debug package.
> See http://www.adalog.fr/compo2.htm
> </PLUG>
> 

I have had good luck with gprof on non-tasking programs though in most 
cases I ended up either having to increase the systems default interrupt 
clock rate to get good results or wrapping the main code I cared about 
in a loop to get good results (this was needed even for non-trival 
programs that were not all that fast to complete).

Also to get reasonable results I often have to revert to using the -F 
option (better when possible) or a series of -f options (still ok but 
not great when -F is really neeeded)

As for tasking programs...There is a lot of info on the web about gprof 
failing with threads/forks/etc and a few platform specific workarounds 
appear to exist.

The failure mechanisms also seem somewhat platform specific as well.

http://sam.zoy.org/writings/programming/gprof.html



  reply	other threads:[~2005-06-08 11:31 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-06-07 16:12 Profiling GNAT programs with gprof Alfred Hilscher
2005-06-07 17:00 ` Alex R. Mosteo
2005-06-07 17:18 ` Marius Amado Alves
2005-06-08  7:22   ` Jean-Pierre Rosen
2005-06-08 11:31     ` Jeff Creem [this message]
2005-06-10  9:49 ` Alfred Hilscher
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox