On 4/13/11, Richard Guenther <richard.guent...@gmail.com> wrote: > On Apr 12, 2011 Diego Novillo <dnovi...@google.com> wrote: > > On Apr 12, 2011 Lawrence Crowl <cr...@google.com> wrote: > > > This patch provides more finer, more precise compile time > > > information. I sent an advisory mail some time ago, and it > > > was good then. Please confirm for trunk. > > > > The patch looks fine to me, but of course it's Jason the one > > you need an OK from. > > Pushing/popping timevars is not free. What's the compile-time > impact of this change (for -ftime-report, of course) - with small > timed regions, does it not just return garbage because of clock > precision issues and overhead of querying the clock iself?
I don't think there is any significant compile-time impact. * The new phase timevars cover so much execution time as to have unnoticible overhead. * The new parser sub-timevars cover significant parsing work: function body, struct body, enum body, template instantiation, and overload resolution. With the exception of enum bodies, all are pretty heavyweight. The overhead might grow from unnoticible to insignificant. * In some cases, the patch replaces a push/pop with a start/stop. The performance difference between those routines is very small. * Most other timevar calls have not changed, they are doing what they did before, so no new overhead is introduced. * The remaining calls were redundant, and the patch removes them, so some existing overhead is removed. -- Lawrence Crowl