From: Jens Axboe Date: Mon, 21 May 2007 08:16:59 +0000 (+0200) Subject: Fix queued vs dispatch numbers X-Git-Tag: blktrace-0.99.3~12 X-Git-Url: https://git.kernel.dk/?a=commitdiff_plain;h=986259305d0f5a91b4118685e8c9bb763200308a;p=blktrace.git Fix queued vs dispatch numbers A merge trace includes a queue trace. blkparse accounted both of them, resulting in the queued transfer number being a lot larger than it should be. Fix that by not accounting bytes in the merge handling. Signed-off-by: Jens Axboe --- diff --git a/blkparse.c b/blkparse.c index 3557aaa..c205c51 100644 --- a/blkparse.c +++ b/blkparse.c @@ -1144,27 +1144,23 @@ static void check_time(struct per_dev_info *pdi, struct blk_io_trace *bit) pdi->last_reported_time = this; } -static inline void __account_m(struct io_stats *ios, struct blk_io_trace *t, - int rw) +static inline void __account_m(struct io_stats *ios, int rw) { - if (rw) { + if (rw) ios->mwrites++; - ios->qwrite_kb += t_kb(t); - } else { + else ios->mreads++; - ios->qread_kb += t_kb(t); - } } static inline void account_m(struct blk_io_trace *t, struct per_cpu_info *pci, int rw) { - __account_m(&pci->io_stats, t, rw); + __account_m(&pci->io_stats, rw); if (per_process_stats) { struct io_stats *ios = find_process_io_stats(t->pid); - __account_m(ios, t, rw); + __account_m(ios, rw); } }