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!news.eternal-september.org!feeder.eternal-september.org!news.unit0.net!takemy.news.telefonica.de!telefonica.de!newsfeed.arcor.de!newsspool1.arcor-online.net!news.arcor.de.POSTED!not-for-mail Date: Wed, 17 Jul 2013 10:00:38 +0200 From: Georg Bauhaus User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:17.0) Gecko/20130620 Thunderbird/17.0.7 MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: Injecting trace code under GNAT References: <07cb9baf-902c-4870-bfd1-aa8018e9d5c5@googlegroups.com> In-Reply-To: <07cb9baf-902c-4870-bfd1-aa8018e9d5c5@googlegroups.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Message-ID: <51e64f27$0$6569$9b4e6d93@newsspool3.arcor-online.net> Organization: Arcor NNTP-Posting-Date: 17 Jul 2013 10:00:39 CEST NNTP-Posting-Host: 4c5f8a7d.newsspool3.arcor-online.net X-Trace: DXC=:HYk9VmbN?mEB;5>eE0T7mMcF=Q^Z^V3h4Fo<]lROoRa8kFjLh>_cHTX3jm_0`fcHND9ah X-Complaints-To: usenet-abuse@arcor.de Xref: news.eternal-september.org comp.lang.ada:16388 Date: 2013-07-17T10:00:39+02:00 List-Id: On 17.07.13 09:33, wrostek wrote: > Hi forum, > > I'm starting new to a fairly large GNAT project. > > Is the GNAT environment providing help to inject trace code > on entry/exit of each subroutine? > > It doesn't matter if it is a one go over the whole codebase > or by pre-processing prior to each compilation. > > I need to hook into my own routines to optimize things for > perfomance reasons. If it is about measuring relative performance of subprograms, then one good approximation is kcachegrind. (With compiler switch -fno-inline in particular). If you can target the JVM using JGNAT, too, then this target might allow injecting something. The -fprofile* compiler switches might be interesting.