public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* how to measure compilation time?
@ 2007-12-05 10:36 mahmoodn
  2007-12-05 10:43 ` satyaakam goswami
  2007-12-05 12:25 ` Sergei Organov
  0 siblings, 2 replies; 5+ messages in thread
From: mahmoodn @ 2007-12-05 10:36 UTC (permalink / raw)
  To: gcc-help


How it is possible to measure compilation time in gcc? any macro, script...
-- 
View this message in context: http://www.nabble.com/how-to-measure-compilation-time--tf4948712.html#a14168965
Sent from the gcc - Help mailing list archive at Nabble.com.

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

* Re: how to measure compilation time?
  2007-12-05 10:36 how to measure compilation time? mahmoodn
@ 2007-12-05 10:43 ` satyaakam goswami
  2007-12-08  6:48   ` mahmoodn
  2007-12-05 12:25 ` Sergei Organov
  1 sibling, 1 reply; 5+ messages in thread
From: satyaakam goswami @ 2007-12-05 10:43 UTC (permalink / raw)
  To: mahmoodn; +Cc: gcc-help

On Dec 5, 2007 4:06 PM, mahmoodn <nt_mahmood@yahoo.com> wrote:
>
> How it is possible to measure compilation time in gcc? any macro, script...
> --
> View this message in context: http://www.nabble.com/how-to-measure-compilation-time--tf4948712.html#a14168965
> Sent from the gcc - Help mailing list archive at Nabble.com.

use /usr/bin/time  "your compile command without quotes" for more info
read the man page.

hth
satya

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

* Re: how to measure compilation time?
  2007-12-05 10:36 how to measure compilation time? mahmoodn
  2007-12-05 10:43 ` satyaakam goswami
@ 2007-12-05 12:25 ` Sergei Organov
  2007-12-08  6:23   ` mahmoodn
  1 sibling, 1 reply; 5+ messages in thread
From: Sergei Organov @ 2007-12-05 12:25 UTC (permalink / raw)
  To: gcc-help

mahmoodn <nt_mahmood@yahoo.com> writes:

> How it is possible to measure compilation time in gcc? any macro,
> script...

`-ftime-report'
     Makes the compiler print some statistics about the time consumed
     by each pass when it finishes.

-- 
Sergei.

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

* Re: how to measure compilation time?
  2007-12-05 12:25 ` Sergei Organov
@ 2007-12-08  6:23   ` mahmoodn
  0 siblings, 0 replies; 5+ messages in thread
From: mahmoodn @ 2007-12-08  6:23 UTC (permalink / raw)
  To: gcc-help


> -ftime-report

I added this to makefile and here is the output of "make": 
g++ -I../../include -I../../../Arrangement_2/include -ggdb -ftime-report
-Wall 
'-I/home/naderan/CGAL-3.2/include/CGAL/config/i686_Linux-2.6_g++-3.3.3'
'-I/home/naderan/CGAL-3.2/include'  -I/usr/X11R6/include      
-I/usr/lib/qt-3.3/include       -DCGAL_USE_CGAL_CORE    -c MD_demo.cpp
 
Execution times (seconds)
 TOTAL                 :   0.52             0.12             4.50
 
Execution times (seconds)
 garbage collection    :   1.19 ( 1%) usr   0.08 ( 0%) sys   3.50 ( 3%) wall
 cfg construction      :   0.35 ( 0%) usr   0.01 ( 0%) sys   0.50 ( 0%) wall
 cfg cleanup           :   0.10 ( 0%) usr   0.01 ( 0%) sys   0.50 ( 0%) wall
 trivially dead code   :   0.17 ( 0%) usr   0.02 ( 0%) sys   0.50 ( 0%) wall
 life analysis         :   0.89 ( 1%) usr   0.01 ( 0%) sys   2.50 ( 2%) wall
 life info update      :   0.44 ( 1%) usr   0.01 ( 0%) sys   0.50 ( 0%) wall
 preprocessing         :   1.36 ( 2%) usr   0.86 ( 4%) sys   3.00 ( 2%) wall
 lexical analysis      :   1.66 ( 2%) usr   2.16 ( 9%) sys   5.00 ( 4%) wall
 parser                :  20.06 (23%) usr   5.82 (25%) sys  33.00 (25%) wall
 name lookup           :  14.02 (16%) usr  13.70 (58%) sys  30.00 (22%) wall
 expand                :   2.17 ( 3%) usr   0.03 ( 0%) sys   2.50 ( 2%) wall
 varconst              :   0.90 ( 1%) usr   0.12 ( 1%) sys   2.00 ( 1%) wall
 integration           :   1.28 ( 1%) usr   0.02 ( 0%) sys   3.00 ( 2%) wall
 jump                  :   0.53 ( 1%) usr   0.06 ( 0%) sys   1.50 ( 1%) wall
 flow analysis         :   0.15 ( 0%) usr   0.01 ( 0%) sys   0.00 ( 0%) wall
 mode switching        :   0.41 ( 0%) usr   0.02 ( 0%) sys   1.50 ( 1%) wall
 scheduling            :   0.00 ( 0%) usr   0.01 ( 0%) sys   0.00 ( 0%) wall
 local alloc           :   1.18 ( 1%) usr   0.03 ( 0%) sys   1.00 ( 1%) wall
 global alloc          :   3.38 ( 4%) usr   0.04 ( 0%) sys   5.50 ( 4%) wall
 flow 2                :   0.36 ( 0%) usr   0.00 ( 0%) sys   0.50 ( 0%) wall
 machine dep reorg     :   0.00 ( 0%) usr   0.01 ( 0%) sys   0.00 ( 0%) wall
 shorten branches      :   0.81 ( 1%) usr   0.00 ( 0%) sys   0.00 ( 0%) wall
 reg stack             :   0.02 ( 0%) usr   0.01 ( 0%) sys   0.00 ( 0%) wall
 final                 :   1.74 ( 2%) usr   0.16 ( 1%) sys   2.00 ( 1%) wall
 symout                :  31.12 (36%) usr   0.25 ( 1%) sys  34.50 (26%) wall
 rest of compilation   :   1.73 ( 2%) usr   0.09 ( 0%) sys   0.50 ( 0%) wall
 TOTAL                 :  86.03            23.54           133.50
g++  -o MD_demo MD_demo.o 
'-L/home/naderan/CGAL-3.2/lib/i686_Linux-2.6_g++-3.3.3'  -L/usr/X11R6/lib      
-L/usr/lib/qt-3.3/lib 
-Wl,-R/home/naderan/CGAL-3.2/lib/i686_Linux-2.6_g++-3.3.3:/usr/X11R6/lib:/usr/lib/qt-3.3/lib 
-lCGAL  -lcore++ -lCGALQt -lqt-mt  -lz   -lmpfr  -lgmpxx  -lgmp  -lX11   -lm
g++ -I../../include -I../../../Arrangement_2/include -ggdb -ftime-report
-Wall 
'-I/home/naderan/CGAL-3.2/include/CGAL/config/i686_Linux-2.6_g++-3.3.3'
'-I/home/naderan/CGAL-3.2/include'  -I/usr/X11R6/include      
-I/usr/lib/qt-3.3/include       -DCGAL_USE_CGAL_CORE    -c VVc_demo.cpp
In file included from /home/naderan/CGAL-3.2/include/CGAL/config.h:35,
                 from /home/naderan/CGAL-3.2/include/CGAL/basic.h:28,
                 from VVc_demo.cpp:28:
/home/naderan/CGAL-3.2/include/CGAL/config/i686_Linux-2.6_g++-3.3.3/CGAL/compiler_config.h:312:1:
warning: "CGAL_USE_GMP" redefined
VVc_demo.cpp:24:1: warning: this is the location of the previous definition
 
Execution times (seconds)
 TOTAL                 :   0.51             0.07             0.50
 
Execution times (seconds)
 garbage collection    :   1.79 ( 1%) usr   0.05 ( 0%) sys   2.50 ( 1%) wall
 cfg construction      :   0.47 ( 0%) usr   0.02 ( 0%) sys   0.50 ( 0%) wall
 cfg cleanup           :   0.09 ( 0%) usr   0.02 ( 0%) sys   0.00 ( 0%) wall
 trivially dead code   :   0.15 ( 0%) usr   0.00 ( 0%) sys   0.00 ( 0%) wall
 life analysis         :   1.22 ( 1%) usr   0.01 ( 0%) sys   4.00 ( 2%) wall
 life info update      :   0.51 ( 0%) usr   0.01 ( 0%) sys   0.00 ( 0%) wall
 preprocessing         :   1.38 ( 1%) usr   1.17 ( 4%) sys   2.00 ( 1%) wall
 lexical analysis      :   1.66 ( 1%) usr   1.82 ( 7%) sys   2.00 ( 1%) wall
 parser                :  25.97 (16%) usr   6.76 (25%) sys  32.50 (16%) wall
 name lookup           :  18.50 (11%) usr  16.23 (59%) sys  39.00 (19%) wall
 expand                :   3.23 ( 2%) usr   0.05 ( 0%) sys   3.50 ( 2%) wall
 varconst              :   1.02 ( 1%) usr   0.14 ( 1%) sys   1.00 ( 0%) wall
 integration           :   1.27 ( 1%) usr   0.00 ( 0%) sys   3.50 ( 2%) wall
 jump                  :   0.47 ( 0%) usr   0.06 ( 0%) sys   1.50 ( 1%) wall
 flow analysis         :   0.15 ( 0%) usr   0.03 ( 0%) sys   0.00 ( 0%) wall
 mode switching        :   0.54 ( 0%) usr   0.04 ( 0%) sys   1.00 ( 0%) wall
 scheduling            :   0.02 ( 0%) usr   0.01 ( 0%) sys   0.00 ( 0%) wall
 local alloc           :   1.51 ( 1%) usr   0.04 ( 0%) sys   2.00 ( 1%) wall
 global alloc          :   4.28 ( 3%) usr   0.06 ( 0%) sys   4.50 ( 2%) wall
 flow 2                :   0.57 ( 0%) usr   0.03 ( 0%) sys   0.00 ( 0%) wall
 machine dep reorg     :   0.02 ( 0%) usr   0.01 ( 0%) sys   0.00 ( 0%) wall
 shorten branches      :   0.95 ( 1%) usr   0.00 ( 0%) sys   0.50 ( 0%) wall
 reg stack             :   0.04 ( 0%) usr   0.01 ( 0%) sys   0.00 ( 0%) wall
 final                 :   2.57 ( 2%) usr   0.29 ( 1%) sys   1.00 ( 0%) wall
 symout                :  96.70 (58%) usr   0.40 ( 1%) sys 102.00 (50%) wall
 rest of compilation   :   2.20 ( 1%) usr   0.18 ( 1%) sys   3.00 ( 1%) wall
 TOTAL                 : 167.29            27.44           206.00
g++  -o VVc_demo VVc_demo.o 
'-L/home/naderan/CGAL-3.2/lib/i686_Linux-2.6_g++-3.3.3'  -L/usr/X11R6/lib      
-L/usr/lib/qt-3.3/lib 
-Wl,-R/home/naderan/CGAL-3.2/lib/i686_Linux-2.6_g++-3.3.3:/usr/X11R6/lib:/usr/lib/qt-3.3/lib 
-lCGAL  -lcore++ -lCGALQt -lqt-mt  -lz   -lmpfr  -lgmpxx  -lgmp  -lX11   -lm

Where is the total make time?? Is it 206 second? or 206 + 133 second? I
think the compilation time was longer than the


Sergei Organov-3 wrote:
> 
> mahmoodn <nt_mahmood@yahoo.com> writes:
> 
>> How it is possible to measure compilation time in gcc? any macro,
>> script...
> 
> `-ftime-report'
>      Makes the compiler print some statistics about the time consumed
>      by each pass when it finishes.
> 
> -- 
> Sergei.
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/how-to-measure-compilation-time--tf4948712.html#a14225908
Sent from the gcc - Help mailing list archive at Nabble.com.

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

* Re: how to measure compilation time?
  2007-12-05 10:43 ` satyaakam goswami
@ 2007-12-08  6:48   ` mahmoodn
  0 siblings, 0 replies; 5+ messages in thread
From: mahmoodn @ 2007-12-08  6:48 UTC (permalink / raw)
  To: gcc-help


> use /usr/bin/time  "your compile command without quotes" for more info

I use "/usr/bin/time make" and for the same program (I posted earlier) I got
these information at the end of make:
288.03user 52.67system 6:37.84elapsed 85%CPU (0avgtext+0avgdata
0maxresident)k
0inputs+0outputs (0major+362698minor)pagefaults 0swaps

Are these numbers in second? I don't think that these numbers are equal to
"-ftime-report"? What is wrong? Am I wrong?
Thanks,


satyaakam goswami wrote:
> 
> On Dec 5, 2007 4:06 PM, mahmoodn <nt_mahmood@yahoo.com> wrote:
>>
>> How it is possible to measure compilation time in gcc? any macro,
>> script...
>> --
>> View this message in context:
>> http://www.nabble.com/how-to-measure-compilation-time--tf4948712.html#a14168965
>> Sent from the gcc - Help mailing list archive at Nabble.com.
> 
> use /usr/bin/time  "your compile command without quotes" for more info
> read the man page.
> 
> hth
> satya
> 
> 

-- 
View this message in context: http://www.nabble.com/how-to-measure-compilation-time--tf4948712.html#a14226019
Sent from the gcc - Help mailing list archive at Nabble.com.

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

end of thread, other threads:[~2007-12-08  6:48 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-12-05 10:36 how to measure compilation time? mahmoodn
2007-12-05 10:43 ` satyaakam goswami
2007-12-08  6:48   ` mahmoodn
2007-12-05 12:25 ` Sergei Organov
2007-12-08  6:23   ` mahmoodn

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).