comp.lang.ada
 help / color / mirror / Atom feed
From: wrostek <wolfgang.rostek@gmx.de>
Subject: Re: Injecting trace code under GNAT
Date: Wed, 17 Jul 2013 01:40:53 -0700 (PDT)
Date: 2013-07-17T01:40:53-07:00	[thread overview]
Message-ID: <0eae2033-0df1-467e-92bd-99004a18d687@googlegroups.com> (raw)
In-Reply-To: <51e64f27$0$6569$9b4e6d93@newsspool3.arcor-online.net>

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.

  reply	other threads:[~2013-07-17  8:40 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-17  7:33 Injecting trace code under GNAT wrostek
2013-07-17  8:00 ` Georg Bauhaus
2013-07-17  8:40   ` wrostek [this message]
2013-07-17  8:15 ` Niklas Holsti
2013-07-17 23:38 ` Randy Brukardt
2013-07-18  6:03 ` J-P. Rosen
2013-07-23  6:59 ` wrostek
2013-07-23 13:43   ` Marc C
2013-07-23 15:44     ` wrostek
2013-07-24  9:10       ` wrostek
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox