mirror of
https://github.com/NLnetLabs/unbound.git
synced 2026-01-16 19:52:55 -05:00
Testing locks became very slow, sped up by initial value change.
git-svn-id: file:///svn/unbound/trunk@224 be551aaa-1e26-0410-a405-d3ace91eadb9
This commit is contained in:
parent
15b5c64106
commit
777190a7f8
2 changed files with 5 additions and 2 deletions
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Reference in a new issue