- Also display ECS module memory stats in stats_shm

git-svn-id: file:///svn/unbound/trunk@4107 be551aaa-1e26-0410-a405-d3ace91eadb9
This commit is contained in:
Ralph Dolmans 2017-04-11 13:37:39 +00:00
parent 8fedcffc02
commit a8bfa02af1
3 changed files with 13 additions and 0 deletions

View File

@ -238,6 +238,9 @@ static void print_mem(struct shm_stat_info* shm_stat)
PR_LL("mem.cache.message", shm_stat->mem.msg);
PR_LL("mem.cache.iterator", shm_stat->mem.iter);
PR_LL("mem.cache.validator", shm_stat->mem.val);
#ifdef CLIENT_SUBNET
PR_LL("mem.cache.subnet", shm_stat->mem.subnet);
#endif
}
/** print histogram */

View File

@ -262,6 +262,13 @@ void shm_main_run(struct worker *worker)
fptr_ok(fptr_whitelist_mod_get_mem(worker->env.mesh->mods.mod[modstack]->get_mem));
shm_stat->mem.iter = (*worker->env.mesh->mods.mod[modstack]->get_mem)(&worker->env, modstack);
}
#ifdef CLIENT_SUBNET
modstack = modstack_find(&worker->env.mesh->mods, "subnet");
if(modstack != -1) {
fptr_ok(fptr_whitelist_mod_get_mem(worker->env.mesh->mods.mod[modstack]->get_mem));
shm_stat->mem.subnet = (*worker->env.mesh->mods.mod[modstack]->get_mem)(&worker->env, modstack);
}
#endif
}
server_stats_add(stat_total, stat_info);

View File

@ -61,6 +61,9 @@ struct shm_stat_info {
size_t rrset;
size_t val;
size_t iter;
#ifdef CLIENT_SUBNET
size_t subnet;
#endif
} mem;
};