Merge branch 'minor_fixes' of https://github.com/sitsofe/fio
[fio.git] / gettime.c
index a14a179bd14e49bc47e5fdb0f118a40ac7edbe0e..3dcaaf680803fdcdb798de6009745f7821118d39 100644 (file)
--- a/gettime.c
+++ b/gettime.c
@@ -28,7 +28,7 @@ static unsigned int max_cycles_shift;
 static unsigned int cycles_wrap;
 #endif
 #endif
-int tsc_reliable = 0;
+bool tsc_reliable = false;
 
 struct tv_valid {
        int warned;
@@ -413,7 +413,7 @@ void fio_clock_init(void)
        fio_clock_source_inited = fio_clock_source;
 
        if (calibrate_cpu_clock())
-               tsc_reliable = 0;
+               tsc_reliable = false;
 
        /*
         * If the arch sets tsc_reliable != 0, then it must be good enough
@@ -425,6 +425,7 @@ void fio_clock_init(void)
                        fio_clock_source = CS_CPUCLOCK;
        } else if (fio_clock_source == CS_CPUCLOCK)
                log_info("fio: clocksource=cpu may not be reliable\n");
+       dprint(FD_TIME, "gettime: clocksource=%d\n", (int) fio_clock_source);
 }
 
 uint64_t ntime_since(const struct timespec *s, const struct timespec *e)
@@ -542,7 +543,7 @@ uint64_t time_since_now(const struct timespec *s)
     defined(CONFIG_SFAA)
 
 #define CLOCK_ENTRIES_DEBUG    100000
-#define CLOCK_ENTRIES_TEST     10000
+#define CLOCK_ENTRIES_TEST     1000
 
 struct clock_entry {
        uint32_t seq;