time: Add chosen clocksource debug
authorSitsofe Wheeler <sitsofe@yahoo.com>
Sun, 9 Jul 2017 19:54:38 +0000 (20:54 +0100)
committerSitsofe Wheeler <sitsofe@yahoo.com>
Thu, 27 Jul 2017 05:15:00 +0000 (06:15 +0100)
Make it a bit easier to see which clocksource was used by printing its
enumeration value when --debug=time is used.

Signed-off-by: Sitsofe Wheeler <sitsofe@yahoo.com>
gettime.c

index 9e5457e0c95a06a0a32930482f92427122d6829d..3dcaaf680803fdcdb798de6009745f7821118d39 100644 (file)
--- a/gettime.c
+++ b/gettime.c
@@ -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)