This is the mail archive of the gcc-patches@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: [patch] Split Parse Timevar (issue4378056)


On 4/13/11, Richard Guenther <richard.guenther@gmail.com> wrote:
> On Apr 12, 2011 Diego Novillo <dnovillo@google.com> wrote:
> > On Apr 12, 2011 Lawrence Crowl <crowl@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


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