diff options
Diffstat (limited to 'source3/smbd')
-rw-r--r-- | source3/smbd/process.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/source3/smbd/process.c b/source3/smbd/process.c index 30d0354223..5e26826d6a 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); |