mirror of
https://github.com/NLnetLabs/unbound.git
synced 2025-12-20 23:00:56 -05:00
More logging.
git-svn-id: file:///svn/unbound/trunk@511 be551aaa-1e26-0410-a405-d3ace91eadb9
This commit is contained in:
parent
0374d468c8
commit
86723bd032
3 changed files with 28 additions and 1 deletions
|
|
@ -3,6 +3,7 @@
|
|||
mess up the dependencies.
|
||||
- canonical compare routine updated.
|
||||
- canonical hinfo compare.
|
||||
- printout list of the queries that the mesh is working on.
|
||||
|
||||
10 August 2007: Wouter
|
||||
- malloc and free overrides that track total allocation and frees.
|
||||
|
|
|
|||
|
|
@ -602,8 +602,28 @@ void mesh_run(struct mesh_area* mesh, struct mesh_state* mstate,
|
|||
(void)rbtree_delete(&mesh->run, mstate);
|
||||
} else mstate = NULL;
|
||||
}
|
||||
if(verbosity >= VERB_ALGO)
|
||||
if(verbosity >= VERB_ALGO) {
|
||||
mesh_stats(mesh, "mesh_run: end");
|
||||
mesh_log_list(mesh);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
mesh_log_list(struct mesh_area* mesh)
|
||||
{
|
||||
char buf[30];
|
||||
struct mesh_state* m;
|
||||
int num = 0;
|
||||
RBTREE_FOR(m, struct mesh_state*, &mesh->all) {
|
||||
snprintf(buf, sizeof(buf), "%d%s%s%s%s%s mod%d %s",
|
||||
num++, (m->s.is_priming)?"p":"", /* prime */
|
||||
(m->s.query_flags&BIT_RD)?"RD":"",
|
||||
(m->s.query_flags&BIT_CD)?"CD":"",
|
||||
(m->super_set.count==0)?"d":"", /* detached */
|
||||
(m->sub_set.count!=0)?"c":"", /* children */
|
||||
m->s.curmod, (m->reply_list)?"hr":"nr"); /*hasreply*/
|
||||
log_query_info(VERB_ALGO, buf, &m->s.qinfo);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
|||
|
|
@ -343,6 +343,12 @@ void mesh_run(struct mesh_area* mesh, struct mesh_state* mstate,
|
|||
*/
|
||||
void mesh_stats(struct mesh_area* mesh, const char* str);
|
||||
|
||||
/**
|
||||
* Print all the states in the mesh to the log.
|
||||
* @param mesh: the mesh to print all states of.
|
||||
*/
|
||||
void mesh_log_list(struct mesh_area* mesh);
|
||||
|
||||
/**
|
||||
* Calculate memory size in use by mesh and all queries inside it.
|
||||
* @param mesh: the mesh to examine.
|
||||
|
|
|
|||
Loading…
Reference in a new issue