[PATCH] lib/tevent: Add trace point callback

Volker Lendecke Volker.Lendecke at SerNet.DE
Fri Jun 8 05:53:17 MDT 2012

On Fri, Jun 08, 2012 at 07:36:10AM -0400, simo wrote:
> On Fri, 2012-06-08 at 13:32 +0200, Volker Lendecke wrote: 
> > On Fri, Jun 08, 2012 at 07:29:34AM -0400, simo wrote:
> > > I guess it would also be a good idea to inline
> > > tevent_trace_point_callback()
> > 
> > Are you sure? What about the branch prediction cache?
> It really depends on how much this will end up being used.
> Perhaps right now it is not a big deal, but tracing functions have the
> bad habit of ending up being used in critical paths in the long run :)

Right. That's why I think there's a trade-off. How expensive
is calling a function vs a branch prediction miss? We have
an if-statement in that function that has the same outcome
throughout the whole program run. Do we benefit from a
correct branch prediction more than we do from a
non-executed call/return?


SerNet GmbH, Bahnhofsallee 1b, 37081 Göttingen
phone: +49-551-370000-0, fax: +49-551-370000-9
AG Göttingen, HRB 2816, GF: Dr. Johannes Loxen
http://www.sernet.de, mailto:kontakt at sernet.de

More information about the samba-technical mailing list