comp.lang.ada
 help / color / mirror / Atom feed
* how to get the compile time of an ada program with gnat
@ 2007-07-19  9:18 frank singhoff
  2007-07-19 10:34 ` Jerome Hugues
  2007-07-19 17:55 ` anon
  0 siblings, 2 replies; 4+ messages in thread
From: frank singhoff @ 2007-07-19  9:18 UTC (permalink / raw)




hello the list,

does somebody know how we can get the compile time of an
 ada program compiled with gnat gpl ??

is these an ada gnat package which provides such a service, or should i do 
it
which a script/makefile   ....


thanks very much !

frank ... who is waiting for the sun at brest :-((










^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: how to get the compile time of an ada program with gnat
  2007-07-19  9:18 how to get the compile time of an ada program with gnat frank singhoff
@ 2007-07-19 10:34 ` Jerome Hugues
  2007-07-19 17:55 ` anon
  1 sibling, 0 replies; 4+ messages in thread
From: Jerome Hugues @ 2007-07-19 10:34 UTC (permalink / raw)


In article <469f2c81$0$25909$ba4acef3@news.orange.fr>, frank singhoff wrote:
> 
> 
> hello the list,
> 
> does somebody know how we can get the compile time of an
>  ada program compiled with gnat gpl ??

You have in GNAT.Source_Info some information for the equivalent of the
__FILE__ and __LINE__ C macros, but unfortunately not for __DATE__ or __TIME__ :(

Not you also have this information in the .ali file, but not as a exported symbol, AFAICT

> is these an ada gnat package which provides such a service, or should i do 
> it
> which a script/makefile   ....

We use some info from SVN and configure to do this in Ocarina

> frank ... who is waiting for the sun at brest :-((

Hard to refrain to make any jokes on sun in Brittany ;)

-- 
Jerome



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: how to get the compile time of an ada program with gnat
  2007-07-19  9:18 how to get the compile time of an ada program with gnat frank singhoff
  2007-07-19 10:34 ` Jerome Hugues
@ 2007-07-19 17:55 ` anon
  2007-07-19 21:25   ` frank singhoff
  1 sibling, 1 reply; 4+ messages in thread
From: anon @ 2007-07-19 17:55 UTC (permalink / raw)


The best way is to use the GNAT1.  The program is included in the gnat 
standard package.  It is the build compiler that gnat uses to build the 
new or updated gnat system and includes a list of tech information after 
each run.  Tech output file is "Standard Error". The thing is the output 
code is two files the first is the ".ali" file and a source assembly file. 
Then you must use an assembler or use "gcc -c" to gen the object 
module.

An Example:

	gnat compile sample.adb  =>  gnat1 sample.adb => gcc -c sample.s

another example that produces a listing is:

	gnat compile example.adb -gnatl  
use 
	gnat1 -gnatl example.adb 
	gcc -c example.s


Example of the output:

  For a program called compile.adb.  Using 

       gnat1 compile.adb 

  The output look like this :

 compile compile___clean compile__L_1__B11b___clean compile__L_1__B16b___clean compile__L_1__B27b___clean compile__L_1__B44b___clean
time in parse: 0.850000
time in integration: 0.000000
time in jump: 0.000000
time in cse: 0.000000
time in loop: 0.000000
time in cse2: 0.000000
time in branch-prob: 0.000000
time in flow: 0.010000
time in combine: 0.000000
time in sched: 0.000000
time in local-alloc: 0.000000
time in global-alloc: 0.050000
time in sched2: 0.000000
time in dbranch: 0.000000
time in shorten-branch: 0.000000
time in stack-reg: 0.000000
time in final: 0.020000
time in varconst: 0.010000
time in symout: 0.000000
time in dump: 0.000000





In <469f2c81$0$25909$ba4acef3@news.orange.fr>, "frank singhoff" <frank.singhoff@orange.fr> writes:
>
>
>hello the list,
>
>does somebody know how we can get the compile time of an
> ada program compiled with gnat gpl ??
>
>is these an ada gnat package which provides such a service, or should i do 
>it
>which a script/makefile   ....
>
>
>thanks very much !
>
>frank ... who is waiting for the sun at brest :-((
>
>
>
>
>
>
>




^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: how to get the compile time of an ada program with gnat
  2007-07-19 17:55 ` anon
@ 2007-07-19 21:25   ` frank singhoff
  0 siblings, 0 replies; 4+ messages in thread
From: frank singhoff @ 2007-07-19 21:25 UTC (permalink / raw)


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 2189 bytes --]


thanks to jerome and to "anon" for their response !!

and see you soon jerome

frank


"anon" <anon@anon.org> a �crit dans le message de news: 
jANni.333995$p47.199692@bgtnsc04-news.ops.worldnet.att.net...
> The best way is to use the GNAT1.  The program is included in the gnat
> standard package.  It is the build compiler that gnat uses to build the
> new or updated gnat system and includes a list of tech information after
> each run.  Tech output file is "Standard Error". The thing is the output
> code is two files the first is the ".ali" file and a source assembly file.
> Then you must use an assembler or use "gcc -c" to gen the object
> module.
>
> An Example:
>
> gnat compile sample.adb  =>  gnat1 sample.adb => gcc -c sample.s
>
> another example that produces a listing is:
>
> gnat compile example.adb -gnatl
> use
> gnat1 -gnatl example.adb
> gcc -c example.s
>
>
> Example of the output:
>
>  For a program called compile.adb.  Using
>
>       gnat1 compile.adb
>
>  The output look like this :
>
> compile compile___clean compile__L_1__B11b___clean 
> compile__L_1__B16b___clean compile__L_1__B27b___clean 
> compile__L_1__B44b___clean
> time in parse: 0.850000
> time in integration: 0.000000
> time in jump: 0.000000
> time in cse: 0.000000
> time in loop: 0.000000
> time in cse2: 0.000000
> time in branch-prob: 0.000000
> time in flow: 0.010000
> time in combine: 0.000000
> time in sched: 0.000000
> time in local-alloc: 0.000000
> time in global-alloc: 0.050000
> time in sched2: 0.000000
> time in dbranch: 0.000000
> time in shorten-branch: 0.000000
> time in stack-reg: 0.000000
> time in final: 0.020000
> time in varconst: 0.010000
> time in symout: 0.000000
> time in dump: 0.000000
>
>
>
>
>
> In <469f2c81$0$25909$ba4acef3@news.orange.fr>, "frank singhoff" 
> <frank.singhoff@orange.fr> writes:
>>
>>
>>hello the list,
>>
>>does somebody know how we can get the compile time of an
>> ada program compiled with gnat gpl ??
>>
>>is these an ada gnat package which provides such a service, or should i do
>>it
>>which a script/makefile   ....
>>
>>
>>thanks very much !
>>
>>frank ... who is waiting for the sun at brest :-((
>>
>>
>>
>>
>>
>>
>>
> 





^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2007-07-19 21:25 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-07-19  9:18 how to get the compile time of an ada program with gnat frank singhoff
2007-07-19 10:34 ` Jerome Hugues
2007-07-19 17:55 ` anon
2007-07-19 21:25   ` frank singhoff

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