This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: how to measure compilation time?


> -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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]