Testing locks became very slow, sped up by initial value change.
git-svn-id: https://unbound.nlnetlabs.nl/svn/trunk@224 be551aaa-1e26-0410-a405-d3ace91eadb9
This commit is contained in:
parent
3fd780ec3c
commit
4aecd8a87b
@ -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 New Issue
Block a user