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: profiling the compilation process itself



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


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