From: Bruce Cran Date: Mon, 20 Feb 2012 17:07:32 +0000 (+0000) Subject: Add FIO_PREFERRED_CLOCK_SOURCE to allow selection of clock source on a per-platform... X-Git-Tag: fio-2.0.4~17 X-Git-Url: https://git.kernel.dk/?p=fio.git;a=commitdiff_plain;h=16de1bf91ca80e62ce257a24cae471fab140bbe0 Add FIO_PREFERRED_CLOCK_SOURCE to allow selection of clock source on a per-platform basis. Signed-off-by: Jens Axboe --- diff --git a/gettime.c b/gettime.c index cf0d6640..e8f5ab55 100644 --- a/gettime.c +++ b/gettime.c @@ -24,7 +24,7 @@ int fio_gtod_offload = 0; int fio_gtod_cpu = -1; static pthread_t gtod_thread; -enum fio_cs fio_clock_source = CS_GTOD; +enum fio_cs fio_clock_source = FIO_PREFERRED_CLOCK_SOURCE; #ifdef FIO_DEBUG_TIME diff --git a/os/os.h b/os/os.h index cbb476fe..c10cb127 100644 --- a/os/os.h +++ b/os/os.h @@ -129,6 +129,10 @@ typedef unsigned long os_cpu_mask_t; #define FIO_OS_PATH_SEPARATOR "/" #endif +#ifndef FIO_PREFERRED_CLOCK_SOURCE +#define FIO_PREFERRED_CLOCK_SOURCE CS_CGETTIME +#endif + #ifndef FIO_MAX_JOBS #define FIO_MAX_JOBS 2048 #endif