aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJan Kara <jack@suse.cz>2012-09-06 10:14:59 +0200
committerChris Mason <chris.mason@oracle.com>2012-09-10 20:53:05 -0400
commit6ab4dfc12e5e5f15395971c94a4f97a73217a513 (patch)
tree48c3fd8d42d08efa0c6b05f55d26012e55547360
parent768e3f8d497797a275554ecde8dd6e41931814b6 (diff)
downloadiowatcher-6ab4dfc12e5e5f15395971c94a4f97a73217a513.tar.gz
Ignore trace records beyond max_seconds
Currently we report error when we find a trace record beyond max_seconds. When we allow user to set end of displayed period, records after the end of period are no longer a bug so just ignore them. Signed-off-by: Jan Kara <jack@suse.cz> Signed-off-by: Chris Mason <chris.mason@fusionio.com>
-rw-r--r--blkparse.c18
1 files changed, 6 insertions, 12 deletions
diff --git a/blkparse.c b/blkparse.c
index 675a771..ab7a637 100644
--- a/blkparse.c
+++ b/blkparse.c
@@ -638,10 +638,8 @@ void add_tput(struct trace *trace, struct graph_line_data *gld)
return;
seconds = SECONDS(io->time);
- if (seconds > gld->max_seconds) {
- fprintf(stderr, "Bad record %d %d %d\n", seconds, gld->max_seconds, action);
- abort();
- }
+ if (seconds > gld->max_seconds)
+ return;
gld->data[seconds].sum += io->bytes;
gld->data[seconds].count = 1;
@@ -685,10 +683,8 @@ void add_pending_io(struct trace *trace, struct graph_line_data *gld)
return;
seconds = SECONDS(io->time);
- if (seconds > gld->max_seconds) {
- fprintf(stderr, "Bad record %d %d\n", seconds, gld->max_seconds);
- abort();
- }
+ if (seconds > gld->max_seconds)
+ return;
ret = hash_dispatched_io(trace->io);
if (ret)
@@ -759,10 +755,8 @@ void add_iop(struct trace *trace, struct graph_line_data *gld)
return;
seconds = SECONDS(io->time);
- if (seconds > gld->max_seconds) {
- fprintf(stderr, "Bad record %d %d\n", seconds, gld->max_seconds);
- abort();
- }
+ if (seconds > gld->max_seconds)
+ return;
gld->data[seconds].sum += 1;
gld->data[seconds].count = 1;