comp.lang.ada
 help / color / mirror / Atom feed
From: rieachus@comcast.net
Subject: Re: Profiling Ada binaries
Date: Mon, 25 Jul 2016 09:45:18 -0700 (PDT)
Date: 2016-07-25T09:45:18-07:00	[thread overview]
Message-ID: <a9f6bc88-81e3-480f-9e2d-91060e1dbdb5@googlegroups.com> (raw)
In-Reply-To: <nn4dfh$1cog$1@gioia.aioe.org>

On Monday, July 25, 2016 at 3:01:07 AM UTC-4, Markus Schöpflin wrote:
I am trying to profile code generated by Gnat using Gprof. For this I add -pg 
to the compilation and link switches, turn down optimization to -O1 and 
disable inlining of functions only called once 
(-fno-inline-functions-called-once).

Gee. I would never think to compile the math libraries with -O1.  Seriously, the math libraries are written with ease of understanding in mind.  You may have thousands of calls in the implementation of one function, and due to the packages being generic, every one of those calls will do an elaboration check.  How can that be efficient?  I believe GNAT has non-generic versions for Short_Float, Float, and Long_Float which use the hardware built-ins.  But I doubt you would get that automatically with -O1.

Try compiling everything with -O3 (or whatever you use) then recompile only the unit you want the tracing for with -O1 and -fno-inline-functions-called-once.


  reply	other threads:[~2016-07-25 16:45 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-22 13:24 Profiling Ada binaries Markus Schöpflin
2016-07-22 14:59 ` Alejandro R. Mosteo
2016-07-22 15:05   ` Alejandro R. Mosteo
2016-07-25  7:01     ` Markus Schöpflin
2016-07-25 16:45       ` rieachus [this message]
2016-07-25 17:14         ` Simon Wright
2016-07-25 22:05           ` rieachus
2016-07-26  8:37         ` Markus Schöpflin
2016-08-01 22:40           ` rieachus
2016-08-01 23:36             ` Jeffrey R. Carter
2016-08-02  7:00               ` Markus Schöpflin
2016-08-05  3:18               ` rieachus
2016-08-05 20:27                 ` Randy Brukardt
2016-08-02  6:39             ` Markus Schöpflin
2016-07-25  6:57   ` Markus Schöpflin
replies disabled

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