summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2012-06-08 14:07:51 +0200
committerStefan Metzmacher <metze@samba.org>2012-06-09 12:09:17 +0200
commitfc96488c64ccf3a3ce946f26dc851d374830c251 (patch)
tree9d5a234bb6c64d6f5118a751427dc1fe2eb45b51 /source3
parent36353a9fc359e8156cfd2e7e4288021aba789b74 (diff)
downloadsamba-fc96488c64ccf3a3ce946f26dc851d374830c251.tar.gz
samba-fc96488c64ccf3a3ce946f26dc851d374830c251.tar.bz2
samba-fc96488c64ccf3a3ce946f26dc851d374830c251.zip
s3:smbd: readd START_PROFILE(smbd_idle)/END_PROFILE(smbd_idle)
metze
Diffstat (limited to 'source3')
-rw-r--r--source3/smbd/process.c15
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);