summaryrefslogtreecommitdiff
path: root/blkparse.c
diff options
context:
space:
mode:
authorJens Axboe <jens.axboe@oracle.com>2007-05-21 10:16:59 +0200
committerJens Axboe <jens.axboe@oracle.com>2007-05-21 10:16:59 +0200
commit986259305d0f5a91b4118685e8c9bb763200308a (patch)
treef99d1dad155ec6a743f29142c454bda0f3ffd496 /blkparse.c
parent00cd304410a4e750ef929823dca3b932baa797b0 (diff)
downloadblktrace-986259305d0f5a91b4118685e8c9bb763200308a.tar.gz
blktrace-986259305d0f5a91b4118685e8c9bb763200308a.tar.bz2
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 <jens.axboe@oracle.com>
Diffstat (limited to 'blkparse.c')
-rw-r--r--blkparse.c14
1 files changed, 5 insertions, 9 deletions
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);
}
}