The following changes since commit 79b199dfb3ae06fc91381e323f21114c73b7b39c: Consistently indent using tabs in Windows files and remove trailing spaces. (2012-12-19 10:47:29 +0100) are available in the git repository at: git://git.kernel.dk/fio.git master Bruce Cran (1): Add return statements to arch_init functions for ia64 and ppc. Jens Axboe (2): Use clock_gettime() for CPU clock calibration Fio 2.0.12.2 FIO-VERSION-GEN | 2 +- arch/arch-ia64.h | 1 + arch/arch-ppc.h | 1 + gettime.c | 26 +++++++++++++++++++------- os/windows/install.wxs | 2 +- 5 files changed, 23 insertions(+), 9 deletions(-) --- Diff of recent changes: diff --git a/FIO-VERSION-GEN b/FIO-VERSION-GEN index d5d2659..b9bd4be 100755 --- a/FIO-VERSION-GEN +++ b/FIO-VERSION-GEN @@ -1,7 +1,7 @@ #!/bin/sh GVF=FIO-VERSION-FILE -DEF_VER=fio-2.0.12.1 +DEF_VER=fio-2.0.12.2 LF=' ' diff --git a/arch/arch-ia64.h b/arch/arch-ia64.h index 8ccbd86..2df55ba 100644 --- a/arch/arch-ia64.h +++ b/arch/arch-ia64.h @@ -47,6 +47,7 @@ extern int tsc_reliable; static inline int arch_init(char *envp[]) { tsc_reliable = 1; + return 0; } #define ARCH_HAVE_FFZ diff --git a/arch/arch-ppc.h b/arch/arch-ppc.h index 0f20375..e73093d 100644 --- a/arch/arch-ppc.h +++ b/arch/arch-ppc.h @@ -63,6 +63,7 @@ extern int tsc_reliable; static inline int arch_init(char *envp[]) { tsc_reliable = 1; + return 0; } #define ARCH_HAVE_FFZ diff --git a/gettime.c b/gettime.c index 248f146..035d275 100644 --- a/gettime.c +++ b/gettime.c @@ -120,6 +120,15 @@ static void fio_init gtod_init(void) #endif /* FIO_DEBUG_TIME */ +static int fill_clock_gettime(struct timespec *ts) +{ +#ifdef FIO_HAVE_CLOCK_MONOTONIC + return clock_gettime(CLOCK_MONOTONIC, ts); +#else + return clock_gettime(CLOCK_REALTIME, ts); +#endif +} + #ifdef FIO_DEBUG_TIME void fio_gettime(struct timeval *tp, void *caller) #else @@ -148,11 +157,7 @@ void fio_gettime(struct timeval *tp, void fio_unused *caller) case CS_CGETTIME: { struct timespec ts; -#ifdef FIO_HAVE_CLOCK_MONOTONIC - if (clock_gettime(CLOCK_MONOTONIC, &ts) < 0) { -#else - if (clock_gettime(CLOCK_REALTIME, &ts) < 0) { -#endif + if (fill_clock_gettime(&ts) < 0) { log_err("fio: clock_gettime fails\n"); assert(0); } @@ -203,15 +208,22 @@ void fio_gettime(struct timeval *tp, void fio_unused *caller) #ifdef ARCH_HAVE_CPU_CLOCK static unsigned long get_cycles_per_usec(void) { + struct timespec ts; struct timeval s, e; unsigned long long c_s, c_e; - gettimeofday(&s, NULL); + fill_clock_gettime(&ts); + s.tv_sec = ts.tv_sec; + s.tv_usec = ts.tv_nsec / 1000; + c_s = get_cpu_clock(); do { unsigned long long elapsed; - gettimeofday(&e, NULL); + fill_clock_gettime(&ts); + e.tv_sec = ts.tv_sec; + e.tv_usec = ts.tv_nsec / 1000; + elapsed = utime_since(&s, &e); if (elapsed >= 1280) { c_e = get_cpu_clock(); diff --git a/os/windows/install.wxs b/os/windows/install.wxs index 002c6e6..402be45 100755 --- a/os/windows/install.wxs +++ b/os/windows/install.wxs @@ -10,7 +10,7 @@ <Product Id="F9883688-6AB3-4BD1-AB93-91D39F12F003" Codepage="1252" Language="1033" Manufacturer="fio" Name="fio" - UpgradeCode="2338A332-5511-43cf-b9BD-5C60496CCFCC" Version="2.0.12.1"> + UpgradeCode="2338A332-5511-43cf-b9BD-5C60496CCFCC" Version="2.0.12.2"> <Package Comments="Contact: Your local administrator" Description="Flexible IO Tester" -- To unsubscribe from this list: send the line "unsubscribe fio" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html