From: Uri Simchoni Date: Mon, 28 Mar 2016 07:18:46 +0000 (+0300) Subject: vfs_aio_linux: call clock_gettime_mono() only on profile-enabled build X-Git-Tag: tdb-1.3.9~83 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=7616229e7722124fdc65f32b30a39cb1c17761a9;p=thirdparty%2Fsamba.git vfs_aio_linux: call clock_gettime_mono() only on profile-enabled build Signed-off-by: Uri Simchoni Reviewed-by: Jeremy Allison --- diff --git a/source3/modules/vfs_aio_linux.c b/source3/modules/vfs_aio_linux.c index caa3149a0e8..55ef1df2c8c 100644 --- a/source3/modules/vfs_aio_linux.c +++ b/source3/modules/vfs_aio_linux.c @@ -27,6 +27,7 @@ #include "lib/util/sys_rw.h" #include #include +#include "smbprofile.h" static int event_fd = -1; static io_context_t io_ctx; @@ -168,7 +169,7 @@ static struct tevent_req *aio_linux_pread_send( piocb = &state->event_iocb; - clock_gettime_mono(&state->start); + PROFILE_TIMESTAMP(&state->start); ret = io_submit(io_ctx, 1, &piocb); if (ret < 0) { tevent_req_error(req, -ret); @@ -205,7 +206,7 @@ static struct tevent_req *aio_linux_pwrite_send( piocb = &state->event_iocb; - clock_gettime_mono(&state->start); + PROFILE_TIMESTAMP(&state->start); ret = io_submit(io_ctx, 1, &piocb); if (ret < 0) { tevent_req_error(req, -ret); @@ -240,7 +241,7 @@ static struct tevent_req *aio_linux_fsync_send( piocb = &state->event_iocb; - clock_gettime_mono(&state->start); + PROFILE_TIMESTAMP(&state->start); ret = io_submit(io_ctx, 1, &piocb); if (ret < 0) { tevent_req_error(req, -ret); @@ -261,7 +262,7 @@ static void aio_linux_done(struct tevent_context *event_ctx, DEBUG(10, ("aio_linux_done called with flags=%d\n", (int)flags)); - clock_gettime_mono(&end); + PROFILE_TIMESTAMP(&end); /* Read the number of events available. */ if (sys_read(event_fd, &num_events, sizeof(num_events)) !=