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 | 35686f9be692c9b9dde821df8b0947e6fe5dce7f (patch) | |
tree | f7ba6fd56bf781f03960dc53f16ada99582df794 | |
parent | 230f060187f09a71185d1321192a497e6a344f80 (diff) | |
download | blktrace-35686f9be692c9b9dde821df8b0947e6fe5dce7f.tar.gz |
iowatcher: 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-- | iowatcher/blkparse.c | 18 |
1 files changed, 6 insertions, 12 deletions
diff --git a/iowatcher/blkparse.c b/iowatcher/blkparse.c index 675a771..ab7a637 100644 --- a/iowatcher/blkparse.c +++ b/iowatcher/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; |