projects
/
fio.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Abstract out generic sync helper
[fio.git]
/
fio.c
diff --git
a/fio.c
b/fio.c
index 728addd614e70aafa2548a7914619052abe06d9f..c33f7868234ebe5d04ee267de7f3806510bb393b 100644
(file)
--- a/
fio.c
+++ b/
fio.c
@@
-40,6
+40,7
@@
#include "verify.h"
#include "diskutil.h"
#include "cgroup.h"
#include "verify.h"
#include "diskutil.h"
#include "cgroup.h"
+#include "profile.h"
unsigned long page_mask;
unsigned long page_size;
unsigned long page_mask;
unsigned long page_size;
@@
-134,7
+135,7
@@
static void sig_quit(int sig)
static void sig_int(int sig)
{
if (threads) {
static void sig_int(int sig)
{
if (threads) {
-
printf
("\nfio: terminating on signal %d\n", sig);
+
log_info
("\nfio: terminating on signal %d\n", sig);
fflush(stdout);
terminate_threads(TERMINATE_ALL);
}
fflush(stdout);
terminate_threads(TERMINATE_ALL);
}
@@
-1210,7
+1211,7
@@
static void *thread_main(void *data)
err:
if (td->error)
err:
if (td->error)
-
printf
("fio: pid=%d, err=%d/%s\n", (int) td->pid, td->error,
+
log_info
("fio: pid=%d, err=%d/%s\n", (int) td->pid, td->error,
td->verror);
if (td->o.verify_async)
td->verror);
if (td->o.verify_async)
@@
-1412,17
+1413,17
@@
static void run_threads(void)
return;
if (!terse_output) {
return;
if (!terse_output) {
-
printf
("Starting ");
+
log_info
("Starting ");
if (nr_thread)
if (nr_thread)
-
printf
("%d thread%s", nr_thread,
+
log_info
("%d thread%s", nr_thread,
nr_thread > 1 ? "s" : "");
if (nr_process) {
if (nr_thread)
printf(" and ");
nr_thread > 1 ? "s" : "");
if (nr_process) {
if (nr_thread)
printf(" and ");
-
printf
("%d process%s", nr_process,
+
log_info
("%d process%s", nr_process,
nr_process > 1 ? "es" : "");
}
nr_process > 1 ? "es" : "");
}
-
printf
("\n");
+
log_info
("\n");
fflush(stdout);
}
fflush(stdout);
}
@@
-1653,6
+1654,9
@@
int main(int argc, char *argv[])
if (parse_options(argc, argv))
return 1;
if (parse_options(argc, argv))
return 1;
+ if (exec_profile && load_profile(exec_profile))
+ return 1;
+
if (!thread_number)
return 0;
if (!thread_number)
return 0;