From: Uri Simchoni Date: Mon, 28 Mar 2016 07:19:49 +0000 (+0300) Subject: vfs_aio_fork: call clock_gettime_mono() only on profile-enabled build X-Git-Url: http://git.samba.org/?a=commitdiff_plain;h=eb2ea0bbf29a94b4fb4fbd24811448e411f8bbca;p=metze%2Fsamba%2Fwip.git vfs_aio_fork: 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_fork.c b/source3/modules/vfs_aio_fork.c index a7221025f963..e699fc5d27f5 100644 --- a/source3/modules/vfs_aio_fork.c +++ b/source3/modules/vfs_aio_fork.c @@ -29,6 +29,7 @@ #include "lib/util/sys_rw.h" #include "lib/util/sys_rw_data.h" #include "lib/msghdr.h" +#include "smbprofile.h" #if !defined(HAVE_STRUCT_MSGHDR_MSG_CONTROL) && !defined(HAVE_STRUCT_MSGHDR_MSG_ACCRIGHTS) # error Can not pass file descriptors @@ -343,7 +344,7 @@ static void aio_child_loop(int sockfd, struct mmap_area *map) ZERO_STRUCT(ret_struct); - clock_gettime_mono(&start); + PROFILE_TIMESTAMP(&start); switch (cmd_struct.cmd) { case READ_CMD: @@ -370,7 +371,7 @@ static void aio_child_loop(int sockfd, struct mmap_area *map) errno = EINVAL; } - clock_gettime_mono(&end); + PROFILE_TIMESTAMP(&end); ret_struct.duration = nsec_time_diff(&end, &start); DEBUG(10, ("aio_child_loop: syscall returned %d\n", (int)ret_struct.size));