X-Git-Url: https://git.kernel.dk/?p=fio.git;a=blobdiff_plain;f=gettime.c;h=3dcaaf680803fdcdb798de6009745f7821118d39;hp=a14a179bd14e49bc47e5fdb0f118a40ac7edbe0e;hb=6730b40f1f2f9a07ac6b28d39fba293fedb1f239;hpb=74558486d208cc073ef3f3f963a51381b9215a04 diff --git a/gettime.c b/gettime.c index a14a179b..3dcaaf68 100644 --- 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;