FW: Compile Timing Information
Thu Sep 5 10:57:00 GMT 2002
On most Unix systems there is a time or timex function.
I believe that you should be able to set your environment variable (or mod your makefile) to set "CC=time gcc" or some equivalent.
A. Daniel King, System Analyst
From: David Durham
Sent: Thursday, September 05, 2002 12:13 PM
Subject: Compile Timing Information
Hi, I'm trying to speed up the compiling of my application. It's C++
and has a heavy used of templates.
The first thing I've done is changed my code to use explicit
instantiation so I don't have to include the template definitions in the
template declaration .h file. This surely sped things up a lot..
However, I was wondering if there were any flags to gcc that will output
timing information per included file or per function or something.. to
show where the compiler spent the majority of it's time.. either what
file or what function.. sorta like runtime profiling..except I want
compile-time profiling I guess..
I looked through the man pages and saw all the -d flags, but didn't know
if any of them would really help me..
More information about the Gcc-help