This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: Time of compiling
- From: "Jayant Sonar" <JayantS at KPITCummins dot com>
- To: <shart1 at jumpy dot it>
- Cc: <gcc-help at gcc dot gnu dot org>
- Date: Fri, 17 Nov 2006 15:40:31 +0530
- Subject: Re: Time of compiling
Hi shart,
> I want that the compiler show the entire duration (in second) of
compilation
> of any programm.
If you are looking for the total time that compiler takes to compile
a program, you can pass the command line option "-ftime-report" to
compiler. It makes the compiler print some statistics about the time
consumed by each pass when it finishes.
e.g. when I passed this option while compiling my C program - "test.c"
as
following -
gcc test.c -ftime-report
I got the details about compilation time as -
preprocessing : 0.01 (50%) usr 0.00 ( 0%) sys 0.00 ( 0%) wall
93 kB (12%) ggc
lexical analysis: 0.00 ( 0%) usr 0.00 ( 0%) sys 0.02 (67%) wall
0 kB ( 0%) ggc
TOTAL : 0.02 0.00 0.03
768 kB
Regards
Jayant