Changeset 77927 in vbox for trunk/src/VBox/ValidationKit/utils/fs/FsPerf.cpp
- Timestamp:
- Mar 27, 2019 11:51:12 PM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/ValidationKit/utils/fs/FsPerf.cpp
r77926 r77927 66 66 # include <errno.h> 67 67 # include <unistd.h> 68 # include <limits.h> 68 69 # include <sys/types.h> 69 70 # include <sys/fcntl.h> … … 78 79 # include <sys/syscall.h> 79 80 # endif 81 # ifdef RT_OS_DARWIN 82 # include <sys/uio.h> 83 # endif 80 84 #endif 81 85 … … 84 88 * Defined Constants And Macros * 85 89 *********************************************************************************************************************************/ 90 /** @def FSPERF_TEST_SENDFILE 91 * Whether to enable the sendfile() tests. */ 92 #if defined(RT_OS_LINUX) || defined(RT_OS_DARWIN) 93 # define FSPERF_TEST_SENDFILE 94 #endif 95 86 96 /** 87 97 * Macro for profiling @a a_fnCall (typically forced inline) for about @a a_cNsTarget ns. … … 1933 1943 } 1934 1944 1935 #if defined(RT_OS_LINUX)1945 #ifdef FSPERF_TEST_SENDFILE 1936 1946 1937 1947 /** … … 2040 2050 off_t cbActual = pArgs->cbSend; 2041 2051 rc = sendfile((int)RTFileToNative(hFile1), (int)RTSocketToNative(hServer), 2052 # ifdef RT_OS_DARWIN 2053 pArgs->offFile, &cbActual, NULL, fSfFlags); 2054 # else 2042 2055 pArgs->offFile, cbActual, NULL, &cbActual, fSfFlags); 2056 # endif 2043 2057 int const iErr = errno; 2044 2058 if (rc != 0) … … 2157 2171 } 2158 2172 2159 #endif /* RT_OS_LINUX*/2173 #endif /* FSPERF_TEST_SENDFILE */ 2160 2174 #ifdef RT_OS_LINUX 2161 2175 … … 3900 3914 for (unsigned i = 0; i < g_cIoBlocks; i++) 3901 3915 fsPerfIoReadBlockSize(hFile1, cbFile, g_acbIoBlocks[i]); 3902 #if defined(RT_OS_LINUX)3916 #ifdef FSPERF_TEST_SENDFILE 3903 3917 if (g_fSendFile) 3904 3918 fsPerfSendFile(hFile1, cbFile);
Note:
See TracChangeset
for help on using the changeset viewer.