Allow override of CFLAGS
[fio.git] / backend.c
index 87810e89d696ea7f453469eff59a486620dbdcab..218ae2545db8fbf5e29a89ef43f954ac6f25bc9c 100644 (file)
--- a/backend.c
+++ b/backend.c
@@ -51,6 +51,7 @@
 #include "memalign.h"
 #include "server.h"
 #include "lib/getrusage.h"
+#include "idletime.h"
 
 static pthread_t disk_util_thread;
 static struct fio_mutex *disk_thread_mutex;
@@ -1499,6 +1500,8 @@ static void run_threads(void)
 
        if (fio_gtod_offload && fio_start_gtod_thread())
                return;
+       
+       fio_idle_prof_init();
 
        set_sig_handlers();
 
@@ -1556,6 +1559,9 @@ static void run_threads(void)
                }
        }
 
+       /* start idle threads before io threads start to run */
+       fio_idle_prof_start();
+
        set_genesis_time();
 
        while (todo) {
@@ -1718,6 +1724,8 @@ static void run_threads(void)
                        usleep(10000);
        }
 
+       fio_idle_prof_stop();
+
        update_io_ticks();
        fio_unpin_memory();
 }