The `--memstats` option from cfg_test is unused, and even if used, does
nothing because `--memstats` relies on `isc_mem_stats` which dump memory
pools statistics, which are not used at all for configuration.
Also, dropping the option avoid to add a parser API to get the memory
stats (as the parser now uses the global memory context).
usage(void) {
fprintf(stderr, "usage: cfg_test --rndc|--named "
"[--grammar] [--zonegrammar] [--active] "
- "[--memstats] conffile\n");
+ "conffile\n");
exit(EXIT_FAILURE);
}
cfg_obj_t *cfg = NULL;
cfg_type_t *type = NULL;
bool grammar = false;
- bool memstats = false;
char *filename = NULL;
unsigned int zonetype = 0;
unsigned int pflags = 0;
} else {
usage();
}
- } else if (strcmp(argv[1], "--memstats") == 0) {
- memstats = true;
} else if (strcmp(argv[1], "--named") == 0) {
type = &cfg_type_namedconf;
} else if (strcmp(argv[1], "--rndc") == 0) {
cfg_obj_detach(&cfg);
}
- if (memstats) {
- /*
- * TODO: this is memstat of config that we are interested in
- * here, right?
- */
- isc_mem_stats(mctx, stderr);
- }
isc_mem_detach(&mctx);
fflush(stdout);