1
0
mirror of https://github.com/samba-team/samba.git synced 2025-02-28 01:58:17 +03:00

vfs_aio_fork: call clock_gettime_mono() only on profile-enabled build

Signed-off-by: Uri Simchoni <uri@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
This commit is contained in:
Uri Simchoni 2016-03-28 10:19:49 +03:00 committed by Jeremy Allison
parent 7616229e77
commit eb2ea0bbf2

View File

@ -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));