This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: profiling the compilation process itself
- From: Alexander Monakov <amonakov at ispras dot ru>
- To: Alex Flint <alex dot flint at gmail dot com>
- Cc: gcc-help at gcc dot gnu dot org
- Date: Fri, 16 Apr 2010 14:01:34 +0400 (MSD)
- Subject: Re: profiling the compilation process itself
- References: <l2zd77f684a1004160135g2ca37459mec893624e6b1865c@mail.gmail.com>
On Fri, 16 Apr 2010, Alex Flint wrote:
> Hi all,
>
> I'm trying to reduce compilation times (aren't we all?) and I would
> like to know what is taking up time. I would like to find out where
> time is being spent for a particular compilation, in terms of which
> bits of the lexer/parser/semantic check/template expansion/etc process
> are taking up how much time. Is there any recommended way to do this?
Adding -ftime-report to the compilation command line will make GCC print some
time statistics. For a more fine-grained report, you will have to use
oprofile or a similar tool to profile the compiler.
Alexander