[cfe-commits] Make -ftime-report produce a coarse breakdown of compilation phases (issue1683046)

Reid Kleckner reid.kleckner at gmail.com
Wed Jun 23 14:22:50 PDT 2010

On Tue, Jun 22, 2010 at 10:24 PM, Daniel Dunbar <daniel at zuster.org> wrote:
> Hi Reid,
> I don't see any changes in Preprocessor.h other than to add #includes,
> was that intentional?

No, that can be discarded.

> Have you measured the impact of your changes on performance? I suspect
> that is going to be prohibitive...

Times for building a debug llvm+clang with a Release-Asserts clang,
without -ftime-report enabled:

real	5m53.240s
user	20m7.335s
sys	1m33.862s

With timers:
real	5m57.742s
user	20m20.052s
sys	1m34.406s

So, it's a 1.25% slowdown.  I don't know if that's in the noise margin
or not.  I didn't repeat the experiment because it takes 12 minutes
and I can't do any other major computational tasks while it's running.

One other drawback to this whole approach is that I'm missing ~17% of
the time spent in the clang -cc1 invocation, and I can't find where
it's coming from.  It may be better to use oprofile or some other
profile and try to break the output of that down by what directory the
source file came from.  I'm not sure how inlining interacts with what
function oprofile assigns the cost to, though, so that may misreport
the costs for the inlined lexing and preprocessing calls.


More information about the cfe-commits mailing list