summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source3/smbd/globals.h2
-rw-r--r--source3/smbd/process.c10
2 files changed, 9 insertions, 3 deletions
diff --git a/source3/smbd/globals.h b/source3/smbd/globals.h
index 8113b8ebbb..0164cb627d 100644
--- a/source3/smbd/globals.h
+++ b/source3/smbd/globals.h
@@ -352,6 +352,8 @@ struct smbXsrv_connection {
} smb2;
struct msg_state *msg_state;
+
+ uint64_t smbd_idle_profstamp;
};
NTSTATUS smbXsrv_connection_init_tables(struct smbXsrv_connection *conn,
diff --git a/source3/smbd/process.c b/source3/smbd/process.c
index 9e1abb268c..465f429747 100644
--- a/source3/smbd/process.c
+++ b/source3/smbd/process.c
@@ -3166,12 +3166,16 @@ NTSTATUS smbXsrv_connection_init_tables(struct smbXsrv_connection *conn,
static void smbd_tevent_trace_callback(enum tevent_trace_point point,
void *private_data)
{
+ struct smbXsrv_connection *conn =
+ talloc_get_type_abort(private_data,
+ struct smbXsrv_connection);
+
switch (point) {
case TEVENT_TRACE_BEFORE_WAIT:
- START_PROFILE(smbd_idle);
+ START_PROFILE_STAMP(smbd_idle, conn->smbd_idle_profstamp);
break;
case TEVENT_TRACE_AFTER_WAIT:
- END_PROFILE(smbd_idle);
+ END_PROFILE_STAMP(smbd_idle, conn->smbd_idle_profstamp);
break;
}
}
@@ -3513,7 +3517,7 @@ void smbd_process(struct tevent_context *ev_ctx,
TALLOC_FREE(frame);
- tevent_set_trace_callback(ev_ctx, smbd_tevent_trace_callback, NULL);
+ tevent_set_trace_callback(ev_ctx, smbd_tevent_trace_callback, conn);
while (True) {
frame = talloc_stackframe_pool(8192);