diff options
author | Jan Kara <jack@suse.cz> | 2012-09-06 10:14:59 +0200 |
---|---|---|
committer | Chris Mason <chris.mason@oracle.com> | 2012-09-10 20:53:05 -0400 |
commit | 6ab4dfc12e5e5f15395971c94a4f97a73217a513 (patch) | |
tree | 48c3fd8d42d08efa0c6b05f55d26012e55547360 | |
parent | 768e3f8d497797a275554ecde8dd6e41931814b6 (diff) | |
download | iowatcher-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.c | 18 |
1 files changed, 6 insertions, 12 deletions
@@ -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; |