From fc96488c64ccf3a3ce946f26dc851d374830c251 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Fri, 8 Jun 2012 14:07:51 +0200 Subject: [PATCH] s3:smbd: readd START_PROFILE(smbd_idle)/END_PROFILE(smbd_idle) metze --- source3/smbd/process.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/source3/smbd/process.c b/source3/smbd/process.c index 30d03542239..5e26826d6a9 100644 --- a/source3/smbd/process.c +++ b/source3/smbd/process.c @@ -3159,6 +3159,19 @@ NTSTATUS smbXsrv_connection_init_tables(struct smbXsrv_connection *conn, return NT_STATUS_OK; } +static void smbd_tevent_trace_callback(enum tevent_trace_point point, + void *private_data) +{ + switch (point) { + case TEVENT_TRACE_BEFORE_WAIT: + START_PROFILE(smbd_idle); + break; + case TEVENT_TRACE_AFTER_WAIT: + END_PROFILE(smbd_idle); + break; + } +} + /**************************************************************************** Process commands from the client ****************************************************************************/ @@ -3496,6 +3509,8 @@ void smbd_process(struct tevent_context *ev_ctx, TALLOC_FREE(frame); + tevent_set_trace_callback(ev_ctx, smbd_tevent_trace_callback, NULL); + while (True) { frame = talloc_stackframe_pool(8192); -- 2.11.4.GIT