summaryrefslogtreecommitdiff
path: root/verify_blkparse.c
diff options
context:
space:
mode:
authorJens Axboe <axboe@suse.de>2006-02-02 13:20:03 +0100
committerJens Axboe <axboe@suse.de>2006-02-02 13:20:03 +0100
commit212421d888f11106dc2b35eab4946e29fbce0b99 (patch)
tree9853c2913ffb862acf8e5a5004bd1e1d586c076d /verify_blkparse.c
parentced8a9bfde18818f157efd02d0bd8af9ac86d487 (diff)
downloadblktrace-212421d888f11106dc2b35eab4946e29fbce0b99.tar.gz
blktrace-212421d888f11106dc2b35eab4946e29fbce0b99.tar.bz2
[PATCH] verify_blkparse: improve output
Diffstat (limited to 'verify_blkparse.c')
-rw-r--r--verify_blkparse.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/verify_blkparse.c b/verify_blkparse.c
index 36287fc..5f01873 100644
--- a/verify_blkparse.c
+++ b/verify_blkparse.c
@@ -1,6 +1,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <fcntl.h>
+#include <string.h>
#include <unistd.h>
#define MAX_CPUS (512)
@@ -8,7 +9,7 @@
int main(int argc, char *argv[])
{
double this_time, last_time;
- char line[256], *p;
+ char line[256], last_line[256], *p;
int major, minor, cpu, seq, nr, alias;
unsigned long long total_entries;
unsigned long last_seq[MAX_CPUS];
@@ -36,10 +37,12 @@ int main(int argc, char *argv[])
break;
if (this_time < last_time) {
- fprintf(stdout, "%s", p);
+ fprintf(stdout, "last: %s", last_line);
+ fprintf(stdout, "this: %s", p);
nr++;
- } else
- last_time = this_time;
+ }
+
+ last_time = this_time;
if (cpu >= MAX_CPUS) {
fprintf(stderr, "cpu%d too large\n", cpu);
@@ -53,6 +56,7 @@ int main(int argc, char *argv[])
last_seq[cpu] = seq;
total_entries++;
+ strcpy(last_line, line);
}
fprintf(stdout, "Events %Lu: %d unordered, %d aliases\n", total_entries, nr, alias);