[PATCH] lib/tevent: Add trace point callback

Martin Schwenke martin at meltin.net
Fri Jun 8 03:50:40 MDT 2012


On Fri, 08 Jun 2012 08:10:42 +0200, "Stefan (metze) Metzmacher"
<metze at samba.org> wrote:

> > Set/get a single callback function to be invoked at various trace
> > points.  Define "before wait" and "after wait" trace points - more
> > trace points can be added later if required.
> > 
> > CTDB wants this to log long waits and events.
> > 

> Can you please remove the globals and put them into struct tevent_context,
> please add a sub struct 'tracing' similar to 'nesting'.

I was initially concerned that changing struct tevent_context might
introduce a gross ABI change.  So we opted for a 1/2 way solution where
the globals could be moved into struct tevent_context later on without
a change to the function API.  However, you're right... it much better
to have them in struct tevent_context to start with...

Done, attached, pushed...

  http://git.ozlabs.org/?p=martins-samba.git;a=shortlog;h=refs/heads/tevent-wip

I've successfully tested this code in CTDB.

Thanks...

peace & happiness,
martin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-lib-tevent-In-poll_event_context-add-a-pointer-back-.patch
Type: text/x-patch
Size: 1007 bytes
Desc: not available
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20120608/ad68815e/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0002-lib-tevent-Add-trace-point-callback.patch
Type: text/x-patch
Size: 13601 bytes
Desc: not available
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20120608/ad68815e/attachment-0001.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 190 bytes
Desc: not available
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20120608/ad68815e/attachment.pgp>


More information about the samba-technical mailing list