summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Kara <jack@suse.cz>2016-05-05 17:17:07 +0200
committerJens Axboe <axboe@fb.com>2016-05-05 09:20:18 -0600
commit4019edfffaf17b72d75ed14b44105aec6eb254e2 (patch)
tree0c203f7d60f3244e859a994eb4bcb1dd513fd9a0
parentf53e6d27eabe09adcb5ec04549d8442b447f6104 (diff)
downloadblktrace-4019edfffaf17b72d75ed14b44105aec6eb254e2.tar.gz
blktrace-4019edfffaf17b72d75ed14b44105aec6eb254e2.tar.bz2
iowatcher: Use queue events if issue not available
Currently queue depth and latency graphs are generated from ISSUE and COMPLETE events. For traces which miss the ISSUE events (e.g. from device mapper) use QUEUE events instead. The result won't be as great but it still conveys some useful information. Signed-off-by: Jan Kara <jack@suse.cz> Signed-off-by: Jens Axboe <axboe@fb.com>
-rw-r--r--iowatcher/blkparse.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/iowatcher/blkparse.c b/iowatcher/blkparse.c
index ef33d5b..78a16e5 100644
--- a/iowatcher/blkparse.c
+++ b/iowatcher/blkparse.c
@@ -1097,8 +1097,17 @@ void add_pending_io(struct trace *trace, struct graph_line_data *gld)
return;
if (action == __BLK_TA_QUEUE) {
- if (trace->found_issue || trace->found_completion)
- hash_queued_io(trace->io);
+ if (trace->found_issue || trace->found_completion) {
+ pio = hash_queued_io(trace->io);
+ /*
+ * When there are no ISSUE events count depth and
+ * latency at least from queue events
+ */
+ if (pio && !trace->found_issue) {
+ pio->dispatch_time = io->time;
+ goto account_io;
+ }
+ }
return;
}
if (action == __BLK_TA_REQUEUE) {
@@ -1118,6 +1127,7 @@ void add_pending_io(struct trace *trace, struct graph_line_data *gld)
free(pio);
}
+account_io:
ios_in_flight++;
seconds = SECONDS(io->time);