From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,9e718c96a7961738 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII Path: g2news1.google.com!news3.google.com!news.glorb.com!border1.nntp.dca.giganews.com!nntp.giganews.com!local01.nntp.dca.giganews.com!nntp.comcast.com!news.comcast.com.POSTED!not-for-mail NNTP-Posting-Date: Wed, 08 Jun 2005 06:31:21 -0500 Date: Wed, 08 Jun 2005 07:31:26 -0400 From: Jeff Creem User-Agent: Mozilla Thunderbird 1.0.2 (Windows/20050317) X-Accept-Language: en-us, en MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: Profiling GNAT programs with gprof References: <42A5C785.CB651501@alfred-hilscher.de> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit Message-ID: NNTP-Posting-Host: 24.147.74.171 X-Trace: sv3-lRTAcSUThAH2NBU3eW5aplUkatL2/VR2Swm8dIBVWbjaLhltTxMr9bo2gTTDbxAdbAbB8ArnmVs+NCZ!XVeumOslIzQiU3pjDhWn1Y4FM4O1zf4ppxBr8zuZVSfpIToyuDShjvBY7AzQaw== X-Complaints-To: abuse@comcast.net X-DMCA-Complaints-To: dmca@comcast.net X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly X-Postfilter: 1.3.32 Xref: g2news1.google.com comp.lang.ada:11261 Date: 2005-06-08T07:31:26-04:00 List-Id: 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. > > > 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 > > 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