diff options
author | Martin Peschke <mpeschke@linux.vnet.ibm.com> | 2008-10-28 17:08:05 +0100 |
---|---|---|
committer | Jens Axboe <jens.axboe@oracle.com> | 2008-10-28 19:09:40 +0100 |
commit | 4bd8e3ba5553be4e6dad03b8f9ef5a7ef984124b (patch) | |
tree | b8d30fe74fe6fc7a37a201002b61c021bfa85eca | |
parent | 369ba3dec9e78c65f9405f20a2b14c8e9cf2940c (diff) | |
download | blktrace-4bd8e3ba5553be4e6dad03b8f9ef5a7ef984124b.tar.gz blktrace-4bd8e3ba5553be4e6dad03b8f9ef5a7ef984124b.tar.bz2 |
blkiomon: fix trace debug output
Removed leftovers of trace tree and made debug code work by using trace
hash instead of trace tree.
Signed-off-by: Martin Peschke <mpeschke@linux.vnet.ibm.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
-rw-r--r-- | blkiomon.c | 14 |
1 files changed, 7 insertions, 7 deletions
@@ -78,7 +78,6 @@ static int interval = -1; static struct trace *vacant_traces_list = NULL; static int vacant_traces = 0; -static struct rb_root trace_tree = RB_ROOT; #define TRACE_HASH_SIZE 128 struct trace *thash[TRACE_HASH_SIZE] = {}; @@ -569,17 +568,18 @@ static int blkiomon_open_msg_q(void) static void blkiomon_debug(void) { - struct rb_node *n; + int i; struct trace *t; if (!debug.fn) return; - for (n = rb_first(&trace_tree); n; n = rb_next(n)) { - t = rb_entry(n, struct trace, node); - dump_bit(t, "leftover"); - leftover++; - } + for (i = 0; i < TRACE_HASH_SIZE; i++) + for (t = thash[i]; t; t = t->next) { + dump_bit(t, "leftover"); + leftover++; + } + fprintf(debug.fp, "%ld leftover, %ld match, %ld mismatch, " "%ld driverdata, %ld overall\n", leftover, match, mismatch, driverdata, sequence); |