[PATCH] tevent patches

Volker Lendecke Volker.Lendecke at SerNet.DE
Fri Feb 28 02:19:22 MST 2014


On Fri, Feb 28, 2014 at 07:27:31PM +1100, Amitay Isaacs wrote:
> On Thu, Feb 27, 2014 at 8:18 PM, Volker Lendecke
> <Volker.Lendecke at sernet.de>wrote:
> 
> > On Thu, Feb 27, 2014 at 09:03:30AM +0100, Stefan (metze) Metzmacher wrote:
> > > Hi Amitay,
> > >
> > > > Here are some improvements to tevent tracing functionality.  This was
> > > > especially useful for debugging CTDB and finding out what events are
> > being
> > > > triggered often.
> > > >
> > > > The patches are also available in my tree:
> > >
> > > We can't make trace point an compile time optional feature,
> > > smbd relies on this feature.
> > >
> > > Can you add a TEVENT_HAS_HANDLER_TRACE_POINTS define similar to
> > > TEVENT_HAS_LOOP_ONCE_TRACE_POINTS?
> >
> > Just brainstorming....
> >
> > Would it be possible to make these tracepoints if not used
> > 0-cost when a handler is executed? If a caller wants to have
> > trace points, can we wrap the handlers in another function
> > at tevent_add_fd time & friends?
> >
> 
> Here's second attempt at tracing patches. This one implements 0-cost
> handler when trace points are not used.
> Also added a define that can be used for configuration checks.

Yes, that is pretty much what I had in mind, thanks for
putting effort into it. The last patch I guess is not really
necessary if we bump up the tevent version.

More brainstorming from my side: Would it be worthwhile to
augment tevent_set_trace_callback to with a bitmask
indicating which trace events the user is interested in?
This is one of our hottest code paths, and adding pointer
dereferences and function calls to the fd and timed event
handlers if you are just interested in the BEFORE_ and
AFTER_WAIT events might be something to consider here.

With best regards,

Volker Lendecke

-- 
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