Add options to have fio latency profile a device
[fio.git] / libfio.c
index 867d86e3dc4e3aea30523a22bf4c9faead07307a..7f36514725738b1f2cb56cc292a366c443137c76 100644 (file)
--- a/libfio.c
+++ b/libfio.c
@@ -41,8 +41,8 @@ FLIST_HEAD(disk_list);
 
 unsigned long arch_flags = 0;
 
-uintptr_t page_mask;
-uintptr_t page_size;
+uintptr_t page_mask = 0;
+uintptr_t page_size = 0;
 
 static const char *fio_os_strings[os_nr] = {
        "Invalid",
@@ -133,6 +133,8 @@ void reset_all_stats(struct thread_data *td)
        fio_gettime(&tv, NULL);
        memcpy(&td->epoch, &tv, sizeof(tv));
        memcpy(&td->start, &tv, sizeof(tv));
+
+       lat_target_init(td);
 }
 
 void reset_fio_state(void)
@@ -241,6 +243,10 @@ int initialize_fio(char *envp[])
                return 1;
        }
 
+#if !defined(CONFIG_GETTIMEOFDAY) && !defined(CONFIG_CLOCK_GETTIME)
+#error "No available clock source!"
+#endif
+
        arch_init(envp);
 
        sinit();