summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2012-06-20 08:53:10 +0200
committerStefan Metzmacher <metze@samba.org>2012-06-20 12:58:58 +0200
commitcd260391fae7888de0e6e1be64eebb50f399525b (patch)
treec8fbdf6bf4d4a1b39e67cf3e3689b3d18c32eac2 /source3
parent0d1f3c13630610447e629c9fbe86c6545b063cff (diff)
downloadsamba-cd260391fae7888de0e6e1be64eebb50f399525b.tar.gz
samba-cd260391fae7888de0e6e1be64eebb50f399525b.tar.bz2
samba-cd260391fae7888de0e6e1be64eebb50f399525b.zip
s3:smbd: fix the build with the --with-profiling-data option
metze
Diffstat (limited to 'source3')
-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);