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=unavailable autolearn_force=no version=3.4.4 X-Received: by 10.236.63.37 with SMTP id z25mr3198504yhc.49.1374050453450; Wed, 17 Jul 2013 01:40:53 -0700 (PDT) X-Received: by 10.49.47.10 with SMTP id z10mr275368qem.7.1374050453405; Wed, 17 Jul 2013 01:40:53 -0700 (PDT) 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.bbs-scene.org!border4.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!border3.nntp.dca.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!t19no1927052qam.0!news-out.google.com!ij2ni362qab.0!nntp.google.com!t19no1927049qam.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Wed, 17 Jul 2013 01:40:53 -0700 (PDT) In-Reply-To: <51e64f27$0$6569$9b4e6d93@newsspool3.arcor-online.net> Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=194.15.135.12; posting-account=GxWvNgoAAAAH4SakIxF38Jkeu4kDHb6i NNTP-Posting-Host: 194.15.135.12 References: <07cb9baf-902c-4870-bfd1-aa8018e9d5c5@googlegroups.com> <51e64f27$0$6569$9b4e6d93@newsspool3.arcor-online.net> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <0eae2033-0df1-467e-92bd-99004a18d687@googlegroups.com> Subject: Re: Injecting trace code under GNAT From: wrostek Injection-Date: Wed, 17 Jul 2013 08:40:53 +0000 Content-Type: text/plain; charset=ISO-8859-1 Xref: news.eternal-september.org comp.lang.ada:16390 Date: 2013-07-17T01:40:53-07:00 List-Id: Thank you both for your quick feedback ... > If it is about measuring relative performance of subprograms, > > then one good approximation is kcachegrind. > > (With compiler switch -fno-inline in particular). No, it's about understanding the program flow. I'm very much preferring tracing over debugging. Means instrumenting code with minor impact on runtime. Of course this is bulk data and needs specific care. As an example I trace simple IDs and only integer values to shared memory and stream it to disk by another process. All formatting is off-line. This way I can inject a fairly huge number of traces by low runtime penalties. My personal taste is to accept up to ~3% runtime increase but have this trace all time available. This did help me a lot in the past to speed up turn-around time for error analysis. But I'm aware that this approach isn't accepted by everybody ;) > > > > If you can target the JVM using JGNAT, too, then this target > > might allow injecting something. Yes, in my Java days there was this nice API interface to the JVM to hook methods in. > > > > The -fprofile* compiler switches might be interesting. I will elaborate all your proposals. Wolfgang R.