]> git.ipfire.org Git - thirdparty/unbound.git/commitdiff
Testing locks became very slow, sped up by initial value change.
authorWouter Wijngaards <wouter@nlnetlabs.nl>
Tue, 3 Apr 2007 13:46:06 +0000 (13:46 +0000)
committerWouter Wijngaards <wouter@nlnetlabs.nl>
Tue, 3 Apr 2007 13:46:06 +0000 (13:46 +0000)
git-svn-id: file:///svn/unbound/trunk@224 be551aaa-1e26-0410-a405-d3ace91eadb9

testcode/lock_verify.c
testcode/unitlruhash.c

index 0d13209b941ec40c6b7bacf1b40b6dbf101f803f..c9d176e4977ea87a79698c61cdf9258a922f03f8 100644 (file)
@@ -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);
index 8f83206c8178a94cc60e2ada8131e714317f3b3f..532e912e8cedaf45e3a4062e4f203f9d229d7d1e 100644 (file)
@@ -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);