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-7-bit Path: g2news1.google.com!news3.google.com!news2.google.com!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: "Alex R. Mosteo" Newsgroups: comp.lang.ada Subject: Re: Profiling GNAT programs with gprof Date: Tue, 07 Jun 2005 19:00:12 +0200 Message-ID: <42A5D29C.8050101@mailinator.com> References: <42A5C785.CB651501@alfred-hilscher.de> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: individual.net f6ROtNVn2u9peGGC/f0JQQX0iW97MU3Mn78mIs/Xjjv3EN/OQ= User-Agent: Mozilla Thunderbird 1.0.2 (X11/20050317) X-Accept-Language: en-us, en In-Reply-To: <42A5C785.CB651501@alfred-hilscher.de> Xref: g2news1.google.com comp.lang.ada:11252 Date: 2005-06-07T19:00:12+02:00 List-Id: Alfred Hilscher wrote: > Has someone experience with gprof and GNAT? It seem to work when I > profile sequential programs, but if I have tasks in my code then the > result of gprof seem invalid. E.g. a procedure called only three times > at all is listed as about 10000 calls. And while the over all runtime of > the prog is about 2 sec, gprof shows the consumed time for this > procedure with a few thousands seconds. > It looks like as if the statistik counters were not initialized. What > have I to do, to get correct results? > I use GNAT 3.15p and Windows 2000. I did this in the past in the same platform as you, also with a multitasking program. I don't remember seeing unexpected counter values. Have you a simple test program to highligth this problem? I could try to run it and compare results. If I'm not mistaken, the timing problem can arise from the way gprof computes time: each call is given a fixed diferential duration. So that can artificially inflate the times reported. But you should check this in the documentation, I may be confused about this behavior.