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=unavailable autolearn_force=no version=3.4.4 Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!news.eternal-september.org!feeder.eternal-september.org!aioe.org!.POSTED!not-for-mail From: =?UTF-8?Q?Markus_Sch=c3=b6pflin?= Newsgroups: comp.lang.ada Subject: Re: Profiling Ada binaries Date: Mon, 25 Jul 2016 08:57:05 +0200 Organization: Aioe.org NNTP Server Message-ID: <7fdcaff3-ada4-4b93-2ded-e1ee3a09ea2c@spam.spam> References: NNTP-Posting-Host: MdpKeRr+sx3LK7JQiK5aNw.user.gioia.aioe.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit X-Complaints-To: abuse@aioe.org User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0 X-Notice: Filtered by postfilter v. 0.8.2 Xref: news.eternal-september.org comp.lang.ada:31147 Date: 2016-07-25T08:57:05+02:00 List-Id: Am 22.07.2016 um 16:59 schrieb Alejandro R. Mosteo: > On 22/07/16 15:24, Markus Schöpflin wrote: >> Dear list, >> >> (...) >> >> Flat profile: >> >> Each sample counts as 0.01 seconds. >> % cumulative self self total >> time seconds seconds calls s/call s/call name >> 4.66 4.91 4.91 429 0.01 0.01 foo1 >> 4.41 9.55 4.64 162635540 0.00 0.00 bar___elabs >> 3.99 13.76 4.21 515639 0.00 0.00 foo2 >> [...] > It's been a long time since I last used gprof, so with the caveat that I may > be totally off the mark: perhaps you're reading the detail in reverse? That > is, from the single elaboration call you're calling something than in turn > calls the math functions. Not likely, as the spec of bar just contains a bunch of array and record declarations and constants to initialize them with. Something along the lines of: type T is array(1..10)(1..10) of Float; T_Def : constant := (others => (others => 0.0)); But interestingly, when looking at the generated object code, the elaboration code of the spec of bar is adjacent to some helper functions used by those trigonometric functions. Looks like gprof somehow gets lost when translating back to symbolic names. Markus