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 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,84be9c5a380874d5 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-04-30 23:11:17 PST Message-ID: <3CCF8702.A7537851@epfl.ch> Date: Wed, 01 May 2002 08:11:14 +0200 From: "Charles Fr. Rey" X-Mailer: Mozilla 4.78 [en] (X11; U; SunOS 5.8 sun4u) X-Accept-Language: en MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: gprof with gnat References: <3CCD2328.C5722FC3@epfl.ch> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit NNTP-Posting-Host: cosun143.epfl.ch X-Trace: epflnews.epfl.ch 1020233474 cosun143.epfl.ch (1 May 2002 08:11:14 +0200) Organization: EPFL Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!news.mailgate.org!news-zh.switch.ch!epflnews.epfl.ch Xref: archiver1.google.com comp.lang.ada:23316 Date: 2002-05-01T08:11:14+02:00 List-Id: gnatmake -g profile etc... it seems that's the missing thing .. I was used to use it on solaris, and you MUST add -largs path/gprof.o, no more ... Thanks, next time i'll read the whole documentation ! "Bobby D. Bryant" wrote: > > On Mon, 29 Apr 2002 04:40:40 -0600, Charles Fr. Rey wrote: > > > Anyone knows how to use gprof with gnat (linux version) ? I was able > > to use it on solaris, but not on my home computer ... > > I'm not very expert with gprof, but I tried it last fall and didn't > seem to have any problems. I use Linux and GNAT. > > Here are some notes I made at the time: > > o Comments in the source file for a jacket program, profile.adb, that > I wrote to drive a GA "solver" for the profiling - > > -- This is useful for testing for memory leaks in the solver: > -- gnatmake profile > -- gnatmem 5 ./profile > -- > -- Also useful for optimizing the solver: > -- make profile > -- ./profile > -- gcov profile.adb > -- emacs profile.adb.gcov > -- n.b. -- you can also run gcov on files that profile.adb depends on. > > o A snippet from my Makefile - > > # For use w/ the gcov profiler: > profile: realclean > gnatmake -g profile \ > -cargs -fprofile-arcs -ftest-coverage \ > -bargs -C -largs -C > > Hopefully that will be enough to get you started. > > Good luck, > > Bobby Bryant > Austi, Texas