X-Git-Url: https://git.kernel.dk/?p=fio.git;a=blobdiff_plain;f=fio.c;h=60261ffa9b26f2fd27e7cf88ff25a6a773d29f96;hp=f0a8ee2636d015116055d69148a0f524dfc50f40;hb=d7df1d133b0c3daad4ae4c731e0dae7b0181fd62;hpb=2e1df07d1ea30e0304cc65370f3ed161a6f22cd4 diff --git a/fio.c b/fio.c index f0a8ee26..60261ffa 100644 --- a/fio.c +++ b/fio.c @@ -22,51 +22,14 @@ * */ #include -#include -#include -#include -#include -#include #include -#include #include -#include -#include -#include -#include -#include #include "fio.h" -#include "hash.h" #include "smalloc.h" -#include "verify.h" -#include "trim.h" -#include "diskutil.h" -#include "cgroup.h" -#include "profile.h" -#include "lib/rand.h" -#include "memalign.h" -#include "server.h" - -unsigned long page_mask; -unsigned long page_size; - -int groupid = 0; -unsigned int thread_number = 0; -unsigned int nr_process = 0; -unsigned int nr_thread = 0; -int shm_id = 0; -int temp_stall_ts; -unsigned long done_secs = 0; - -/* - * Just expose an empty list, if the OS does not support disk util stats - */ -#ifndef FIO_HAVE_DISK_UTIL -FLIST_HEAD(disk_list); -#endif -unsigned long arch_flags = 0; +uintptr_t page_mask = 0; +uintptr_t page_size = 0; static int endian_check(void) { @@ -82,10 +45,10 @@ static int endian_check(void) else if (u.c[0] == 0x12) le = 1; -#if defined(FIO_LITTLE_ENDIAN) +#if defined(CONFIG_LITTLE_ENDIAN) if (be) return 1; -#elif defined(FIO_BIG_ENDIAN) +#elif defined(CONFIG_BIG_ENDIAN) if (le) return 1; #else @@ -108,6 +71,10 @@ int main(int argc, char *argv[], char *envp[]) return 1; } +#if !defined(CONFIG_GETTIMEOFDAY) && !defined(CONFIG_CLOCK_GETTIME) +#error "No available clock source!" +#endif + arch_init(envp); sinit(); @@ -133,6 +100,8 @@ int main(int argc, char *argv[], char *envp[]) if (parse_options(argc, argv)) return 1; + fio_time_init(); + if (nr_clients) return fio_handle_clients(); else