From 777190a7f81d55bd22bba882737c072f795beff8 Mon Sep 17 00:00:00 2001 From: Wouter Wijngaards Date: Tue, 3 Apr 2007 13:46:06 +0000 Subject: [PATCH] Testing locks became very slow, sped up by initial value change. git-svn-id: file:///svn/unbound/trunk@224 be551aaa-1e26-0410-a405-d3ace91eadb9 --- testcode/lock_verify.c | 3 +++ testcode/unitlruhash.c | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/testcode/lock_verify.c b/testcode/lock_verify.c index 0d13209b9..c9d176e49 100644 --- a/testcode/lock_verify.c +++ b/testcode/lock_verify.c @@ -337,6 +337,9 @@ static void search_cycle(struct lock_ref* visit, int level, /* recurse */ if(!visit->lock->visited) from = visit; + if(verb > 1) fprintf(stderr, "[%d] visit lock %u %u %s %d\n", level, + visit->lock->id.thr, visit->lock->id.instance, + visit->lock->create_file, visit->lock->create_line); RBTREE_FOR(ref, struct lock_ref*, visit->lock->smaller) { ref->lock->dfs_next = visit; search_cycle(ref, level+1, from); diff --git a/testcode/unitlruhash.c b/testcode/unitlruhash.c index 8f83206c8..532e912e8 100644 --- a/testcode/unitlruhash.c +++ b/testcode/unitlruhash.c @@ -495,14 +495,14 @@ void lruhash_test() /* also small in size so that reclaim has to be done quickly. */ struct lruhash* table ; printf("lruhash test\n"); - table = lruhash_create(2, 16384, + table = lruhash_create(1024, 16384, test_sizefunc, test_compfunc, test_delkey, test_deldata, NULL); test_bin_find_entry(table); test_lru(table); test_short_table(table); test_long_table(table); lruhash_delete(table); - table = lruhash_create(2, 16384, + table = lruhash_create(1024, 16384, test_sizefunc, test_compfunc, test_delkey, test_deldata, NULL); test_threaded_table(table); lruhash_delete(table); -- 2.47.2