summaryrefslogtreecommitdiff
path: root/blkparse_fmt.c
diff options
context:
space:
mode:
authorJens Axboe <axboe@suse.de>2005-10-06 14:25:52 +0200
committerJens Axboe <axboe@suse.de>2005-10-06 14:25:52 +0200
commitae957cbc4f0d0eb7b442dc3c4693db996bcd5170 (patch)
treed679249de0ca2be8d72627517064b7474871e410 /blkparse_fmt.c
parenta8f30e64d4d3e05fac70a918d175029412cb1ee7 (diff)
downloadblktrace-ae957cbc4f0d0eb7b442dc3c4693db996bcd5170.tar.gz
blktrace-ae957cbc4f0d0eb7b442dc3c4693db996bcd5170.tar.bz2
[PATCH] blkparse: fix remap sectors dump, it was in kb
Add t_kb(t) and t_sec(t) macros to help with this.
Diffstat (limited to 'blkparse_fmt.c')
-rw-r--r--blkparse_fmt.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/blkparse_fmt.c b/blkparse_fmt.c
index b8f90de..c445d0d 100644
--- a/blkparse_fmt.c
+++ b/blkparse_fmt.c
@@ -159,7 +159,7 @@ static void print_field(char *act, struct per_cpu_info *pci,
fprintf(ofp, strcat(format, "d"), MINOR(t->device));
break;
case 'n':
- fprintf(ofp, strcat(format, "u"), t->bytes >> 9);
+ fprintf(ofp, strcat(format, "u"), t_sec(t));
break;
case 'N':
fprintf(ofp, strcat(format, "u"), t->bytes);
@@ -257,11 +257,11 @@ static void process_default(char *act, struct per_cpu_info *pci,
if (elapsed != -1ULL) {
fprintf(ofp, "%llu + %u (%8llu) [%d]\n",
(unsigned long long) t->sector,
- t->bytes >> 9, elapsed, t->error);
+ t_sec(t), elapsed, t->error);
} else {
fprintf(ofp, "%llu + %u [%d]\n",
(unsigned long long) t->sector,
- t->bytes >> 9, t->error);
+ t_sec(t), t->error);
}
}
break;
@@ -281,11 +281,11 @@ static void process_default(char *act, struct per_cpu_info *pci,
if (elapsed != -1ULL) {
fprintf(ofp, "%llu + %u (%8llu) [%s]\n",
(unsigned long long) t->sector,
- t->bytes >> 9, elapsed, t->comm);
+ t_sec(t), elapsed, t->comm);
} else {
fprintf(ofp, "%llu + %u [%s]\n",
(unsigned long long) t->sector,
- t->bytes >> 9, t->comm);
+ t_sec(t), t->comm);
}
}
break;
@@ -296,7 +296,7 @@ static void process_default(char *act, struct per_cpu_info *pci,
case 'G': /* Get request */
case 'S': /* Sleep request */
fprintf(ofp, "%llu + %u [%s]\n", (unsigned long long) t->sector,
- t->bytes >> 9, t->comm);
+ t_sec(t), t->comm);
break;
case 'P': /* Plug */
@@ -313,7 +313,7 @@ static void process_default(char *act, struct per_cpu_info *pci,
get_pdu_remap(t, &r);
fprintf(ofp, "%llu + %u <- (%d,%d) %llu\n",
- (unsigned long long) r.sector, t->bytes >> 10,
+ (unsigned long long) r.sector, t_sec(t),
MAJOR(r.device), MINOR(r.device),
(unsigned long long) t->sector);
break;