summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--btt/args.c22
-rw-r--r--btt/bt_timeline.c4
-rw-r--r--btt/doc/btt.tex7
-rw-r--r--btt/globals.h2
-rw-r--r--btt/trace_remap.c6
-rw-r--r--doc/btt.110
6 files changed, 40 insertions, 11 deletions
diff --git a/btt/args.c b/btt/args.c
index 1830125..ed53b8b 100644
--- a/btt/args.c
+++ b/btt/args.c
@@ -29,7 +29,7 @@
#define SETBUFFER_SIZE (64 * 1024)
-#define S_OPTS "aAB:d:D:e:hi:I:l:L:m:M:o:p:P:q:Q:s:S:t:T:u:VvXz:"
+#define S_OPTS "aAB:d:D:e:hi:I:l:L:m:M:o:p:P:q:Q:rs:S:t:T:u:VvXz:"
static struct option l_opts[] = {
{
.name = "seek-absolute",
@@ -140,6 +140,12 @@ static struct option l_opts[] = {
.val = 'Q'
},
{
+ .name = "no-remaps",
+ .has_arg = no_argument,
+ .flag = NULL,
+ .val = 'r'
+ },
+ {
.name = "seeks",
.has_arg = required_argument,
.flag = NULL,
@@ -217,6 +223,7 @@ static char usage_str[] = \
"[ -P <output name> | --per-io-trees=<output name> ]\n" \
"[ -q <output name> | --q2c-latencies=<output name> ]\n" \
"[ -Q <output name> | --active-queue-depth=<output name> ]\n" \
+ "[ -r | --no-remaps ]\n" \
"[ -s <output name> | --seeks=<output name> ]\n" \
"[ -S <interval> | --iostat-interval=<interval> ]\n" \
"[ -t <sec> | --time-start=<sec> ]\n" \
@@ -335,6 +342,9 @@ void handle_args(int argc, char *argv[])
case 'Q':
aqd_name = optarg;
break;
+ case 'r':
+ ignore_remaps = 1;
+ break;
case 's':
seek_name = optarg;
break;
@@ -390,12 +400,12 @@ void handle_args(int argc, char *argv[])
rngs_ofp = avgs_ofp = msgs_ofp = stdout;
easy_parse_avgs = 0;
} else {
- rngs_ofp = std_open(output_name, ".dat", "range data");
- avgs_ofp = std_open(output_name, ".avg", "stats data");
- msgs_ofp = std_open(output_name, ".msg", "K messages");
+ rngs_ofp = std_open(output_name, "dat", "range data");
+ avgs_ofp = std_open(output_name, "avg", "stats data");
+ msgs_ofp = std_open(output_name, "msg", "K messages");
if (easy_parse_avgs) {
- xavgs_ofp = std_open(output_name, ".xvg",
- "X stats data");
+ xavgs_ofp = std_open(output_name, "xvg",
+ "EZ stats data");
}
}
diff --git a/btt/bt_timeline.c b/btt/bt_timeline.c
index d1fefe3..24dafc8 100644
--- a/btt/bt_timeline.c
+++ b/btt/bt_timeline.c
@@ -25,14 +25,14 @@
#include <time.h>
#include "globals.h"
-char bt_timeline_version[] = "2.07";
+char bt_timeline_version[] = "2.08";
char *devices, *exes, *input_name, *output_name, *seek_name, *bno_dump_name;
char *d2c_name, *q2c_name, *per_io_name, *unplug_hist_name;
char *sps_name, *aqd_name, *q2d_name, *per_io_trees;
FILE *rngs_ofp, *avgs_ofp, *xavgs_ofp, *per_io_ofp, *msgs_ofp;
int verbose, done, time_bounded, output_all_data, seek_absolute;
-int easy_parse_avgs;
+int easy_parse_avgs, ignore_remaps;
double t_astart, t_aend;
unsigned long n_traces;
struct avgs_info all_avgs;
diff --git a/btt/doc/btt.tex b/btt/doc/btt.tex
index 4f59971..2907554 100644
--- a/btt/doc/btt.tex
+++ b/btt/doc/btt.tex
@@ -799,7 +799,7 @@ Device: rrqm/s wrqm/s r/s w/s rsec/s wsec/s
\newpage\section{\label{sec:cmd-line}Command Line}
\begin{verbatim}
-Usage: btt 2.07
+Usage: btt 2.08
[ -a | --seek-absolute ]
[ -A | --all-data ]
[ -B <output name> | --dump-blocknos=<output name> ]
@@ -818,6 +818,7 @@ Usage: btt 2.07
[ -P <output name> | --per-io-trees=<output name> ]
[ -q <output name> | --q2c-latencies=<output name> ]
[ -Q <output name> | --active-queue-depth=<output name> ]
+[ -r | --no-remaps ]
[ -s <output name> | --seeks=<output name> ]
[ -S <interval> | --iostat-interval=<interval> ]
[ -t <sec> | --time-start=<sec> ]
@@ -963,6 +964,10 @@ time values are separated from the Q time values with a vertical bar.
driver. (The value is incremented when an \emph{issue} is performend,
and decremented when a \emph{complete} is performed.
+\subsection{\label{sec:o-r}\texttt{--no-remaps}/\texttt{-r}}
+
+ Ignore remap traces; older kernels did not implement the full remap PDU.
+
\subsection{\label{sec:o-s}\texttt{--seeks}/\texttt{-s}}
This option instructs \texttt{btt} to generate the seek data file
diff --git a/btt/globals.h b/btt/globals.h
index caca6ac..43c38f4 100644
--- a/btt/globals.h
+++ b/btt/globals.h
@@ -174,7 +174,7 @@ extern double range_delta, plat_freq;
extern FILE *rngs_ofp, *avgs_ofp, *xavgs_ofp, *iostat_ofp, *per_io_ofp;
extern FILE *msgs_ofp;
extern int verbose, done, time_bounded, output_all_data, seek_absolute;
-extern int easy_parse_avgs;
+extern int easy_parse_avgs, ignore_remaps;
extern unsigned int n_devs;
extern unsigned long n_traces;
extern struct list_head all_devs, all_procs;
diff --git a/btt/trace_remap.c b/btt/trace_remap.c
index 22d340b..8739cda 100644
--- a/btt/trace_remap.c
+++ b/btt/trace_remap.c
@@ -35,8 +35,12 @@ void trace_remap(struct io *a_iop)
{
struct io *q_iop;
struct d_info *q_dip;
- struct blk_io_trace_remap *rp = a_iop->pdu;
+ struct blk_io_trace_remap *rp;
+ if (ignore_remaps)
+ goto out;
+
+ rp = a_iop->pdu;
cvt_pdu_remap(rp);
a_iop->t.device = rp->device_from;
diff --git a/doc/btt.1 b/doc/btt.1
index fa437f9..45d6c0c 100644
--- a/doc/btt.1
+++ b/doc/btt.1
@@ -41,6 +41,8 @@ btt \- analyse block i/o traces produces by blktrace
.br
[ \-Q <\fIoutput name\fR> | \-\-active\-queue\-depth=<\fIoutput name\fR> ]
.br
+[ \-r | \-\-no\-remaps ]
+.br
[ \-s <\fIoutput name\fR> | \-\-seeks=<\fIoutput name\fR> ]
.br
[ \-S <\fIinterval\fR> | \-\-iostat\-interval=<\fIinterval\fR> ]
@@ -245,6 +247,14 @@ The \-Q option allows one to output data files showing the time stamp
and the depth of active commands (those issued but not completed).
.RE
+.B \-r
+.br
+.B \-\-no\-remaps
+.RS 4
+Ignore remap traces; older kernels did not implement the full remap
+PDU.
+.RE
+
.B \-s <\fIoutput name\fR>
.br
.B \-\-seeks=<\fIoutput name\fR>