path: root/blktrace.h
diff options
authorIvan Dyukov <>2013-03-19 08:16:27 -0600
committerJens Axboe <>2013-03-19 08:16:27 -0600
commitcd0ae0f6bc3d72e89d0b258aa2040437b75d4ef2 (patch)
tree2bbedbe590ae010a5c7f294e056581c42e10cfe3 /blktrace.h
parentd6918c8832793b4205ed3bfede78c2f915c23385 (diff)
More accurate calculation of the total read/write values
If block device has many request with size less than 1K, blkparse ignores such requests because it treats each request in Kb. Signed-off-by: Jens Axboe <>
Diffstat (limited to 'blktrace.h')
1 files changed, 4 insertions, 0 deletions
diff --git a/blktrace.h b/blktrace.h
index 5da6dbc..380aec7 100644
--- a/blktrace.h
+++ b/blktrace.h
@@ -23,6 +23,7 @@
#define t_sec(t) ((t)->bytes >> 9)
#define t_kb(t) ((t)->bytes >> 10)
+#define t_b(t) ((t)->bytes & 1023)
typedef __u32 u32;
typedef __u8 u8;
@@ -31,11 +32,14 @@ struct io_stats {
unsigned long qreads, qwrites, creads, cwrites, mreads, mwrites;
unsigned long ireads, iwrites, rrqueue, wrqueue;
unsigned long long qread_kb, qwrite_kb, cread_kb, cwrite_kb;
+ unsigned long long qread_b, qwrite_b, cread_b, cwrite_b;
unsigned long long iread_kb, iwrite_kb;
unsigned long long mread_kb, mwrite_kb;
+ unsigned long long mread_b, mwrite_b, iread_b, iwrite_b;
unsigned long qreads_pc, qwrites_pc, ireads_pc, iwrites_pc;
unsigned long rrqueue_pc, wrqueue_pc, creads_pc, cwrites_pc;
unsigned long long qread_kb_pc, qwrite_kb_pc, iread_kb_pc, iwrite_kb_pc;
+ unsigned long long qread_b_pc, qwrite_b_pc, iread_b_pc, iwrite_b_pc;
unsigned long io_unplugs, timer_unplugs;