projects
/
fio.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
gettime: slightly improve CPU clock calibration
[fio.git]
/
init.c
diff --git
a/init.c
b/init.c
index eff2dea9562d0122e67ed6110b48e67899ed58c0..560da8ffac8a6d467dcbba6c93a10b28f61b5bae 100644
(file)
--- a/
init.c
+++ b/
init.c
@@
-30,6
+30,7
@@
#include "idletime.h"
#include "filelock.h"
#include "steadystate.h"
#include "idletime.h"
#include "filelock.h"
#include "steadystate.h"
+#include "blktrace.h"
#include "oslib/getopt.h"
#include "oslib/strcasestr.h"
#include "oslib/getopt.h"
#include "oslib/strcasestr.h"
@@
-46,6
+47,7
@@
static char **ini_file;
static int max_jobs = FIO_MAX_JOBS;
static int dump_cmdline;
static int parse_only;
static int max_jobs = FIO_MAX_JOBS;
static int dump_cmdline;
static int parse_only;
+static int merge_blktrace_only;
static struct thread_data def_thread;
struct thread_data *threads = NULL;
static struct thread_data def_thread;
struct thread_data *threads = NULL;
@@
-286,6
+288,11
@@
static struct option l_opts[FIO_NR_OPTIONS] = {
.has_arg = required_argument,
.val = 'K',
},
.has_arg = required_argument,
.val = 'K',
},
+ {
+ .name = (char *) "merge-blktrace-only",
+ .has_arg = no_argument,
+ .val = 'A' | FIO_CLIENT_FLAG,
+ },
{
.name = NULL,
},
{
.name = NULL,
},
@@
-1694,20
+1701,21
@@
static int add_job(struct thread_data *td, const char *jobname, int job_add_num,
}
buf_output_init(&out);
}
buf_output_init(&out);
- log_buf(&out, "%s: (g=%d): rw=%s, ", td->o.name,
+
__
log_buf(&out, "%s: (g=%d): rw=%s, ", td->o.name,
td->groupid,
ddir_str(o->td_ddir));
if (o->bs_is_seq_rand)
td->groupid,
ddir_str(o->td_ddir));
if (o->bs_is_seq_rand)
- log_buf(&out, "bs=(R) %s-%s, (W) %s-%s, bs_is_seq_rand, ",
+
__
log_buf(&out, "bs=(R) %s-%s, (W) %s-%s, bs_is_seq_rand, ",
c1, c2, c3, c4);
else
c1, c2, c3, c4);
else
- log_buf(&out, "bs=(R) %s-%s, (W) %s-%s, (T) %s-%s, ",
+
__
log_buf(&out, "bs=(R) %s-%s, (W) %s-%s, (T) %s-%s, ",
c1, c2, c3, c4, c5, c6);
c1, c2, c3, c4, c5, c6);
- log_buf(&out, "ioengine=%s, iodepth=%u\n",
+
__
log_buf(&out, "ioengine=%s, iodepth=%u\n",
td->io_ops->name, o->iodepth);
log_info_buf(out.buf, out.buflen);
td->io_ops->name, o->iodepth);
log_info_buf(out.buf, out.buflen);
+ buf_output_free(&out);
free(c1);
free(c2);
free(c1);
free(c2);
@@
-1723,6
+1731,14
@@
static int add_job(struct thread_data *td, const char *jobname, int job_add_num,
if (td_steadystate_init(td))
goto err;
if (td_steadystate_init(td))
goto err;
+ if (o->merge_blktrace_file && !merge_blktrace_iologs(td))
+ goto err;
+
+ if (merge_blktrace_only) {
+ put_job(td);
+ return 0;
+ }
+
/*
* recurse add identical jobs, clear numjobs and stonewall options
* as they don't apply to sub-jobs
/*
* recurse add identical jobs, clear numjobs and stonewall options
* as they don't apply to sub-jobs
@@
-2172,6
+2188,7
@@
static void usage(const char *name)
printf(" --debug=options\tEnable debug logging. May be one/more of:\n");
show_debug_categories();
printf(" --parse-only\t\tParse options only, don't start any IO\n");
printf(" --debug=options\tEnable debug logging. May be one/more of:\n");
show_debug_categories();
printf(" --parse-only\t\tParse options only, don't start any IO\n");
+ printf(" --merge-blktrace-only\tMerge blktraces only, don't start any IO\n");
printf(" --output\t\tWrite output to file\n");
printf(" --bandwidth-log\tGenerate aggregate bandwidth logs\n");
printf(" --minimal\t\tMinimal (terse) output\n");
printf(" --output\t\tWrite output to file\n");
printf(" --bandwidth-log\tGenerate aggregate bandwidth logs\n");
printf(" --minimal\t\tMinimal (terse) output\n");
@@
-2888,6
+2905,11
@@
int parse_cmd_line(int argc, char *argv[], int client_type)
}
trigger_timeout /= 1000000;
break;
}
trigger_timeout /= 1000000;
break;
+
+ case 'A':
+ did_arg = true;
+ merge_blktrace_only = 1;
+ break;
case '?':
log_err("%s: unrecognized option '%s'\n", argv[0],
argv[optind - 1]);
case '?':
log_err("%s: unrecognized option '%s'\n", argv[0],
argv[optind - 1]);