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,32397e53f83af42a X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-10-24 04:26:45 PST Path: archiver1.google.com!news2.google.com!news.maxwell.syr.edu!small1.nntp.aus1.giganews.com!nntp.giganews.com!cyclone1.gnilink.net!wn14feed!worldnet.att.net!204.127.198.203!attbi_feed3!attbi_feed4!attbi.com!attbi_s03.POSTED!not-for-mail From: "Jeff C," Newsgroups: comp.lang.ada References: Subject: Re: profiler X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1158 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 Message-ID: NNTP-Posting-Host: 66.31.4.164 X-Complaints-To: abuse@comcast.net X-Trace: attbi_s03 1066994804 66.31.4.164 (Fri, 24 Oct 2003 11:26:44 GMT) NNTP-Posting-Date: Fri, 24 Oct 2003 11:26:44 GMT Organization: Comcast Online Date: Fri, 24 Oct 2003 11:26:44 GMT Xref: archiver1.google.com comp.lang.ada:1591 Date: 2003-10-24T11:26:44+00:00 List-Id: "Peter Hermann" wrote in message news:bnaqu6$519$2@news.uni-stuttgart.de... > please inform me about ways to profile an Ada program. > A friend needs statistics on consumption of CPU-time and wall-clock-time > of his Ada program system. > Any info about methods and ready2use tools is welcome for me: > ica2ph@csv.ica.uni-stuttgart.de > Depends on the platform/compiler,etc. With GNAT/GCC technology just compile with -g -pg -fprofile-arcs When the program is over, run gprof The output looks a little scary at first but it is actually quite useful.. I'll think about writing a tutorial later today but the man pages are pretty good in this area. Known Problems: Statistical Profilers typically operate by interrupting the program at fixed intervals and seeing who is running. Typically these interrupt at rates like 50-100Hz which means that you might need to run your program multiple times and or loop over it for a while to get accurate results On Linux, I believe the profiler is somewhat broken in that it does not really work well with threaded programs (and thus not well with Ada tasking programs).