Implement opt.stats_interval and the _opts options.

Add options stats_interval and stats_interval_opts to allow interval based stats
printing.  This provides an easy way to collect stats without code changes,
because opt.stats_print may not work (some binaries never exit).
This commit is contained in:
Qi Wang
2020-01-13 22:29:17 -08:00
committed by Qi Wang
parent d71a145ec1
commit 88b0e03a4e
14 changed files with 334 additions and 50 deletions

View File

@@ -571,7 +571,10 @@ void
prof_idump_rollback_impl(tsdn_t *tsdn, size_t usize) {
cassert(config_prof);
return counter_rollback(tsdn, &prof_idump_accumulated, usize);
/* Rollback is only done on arena_prof_promote of small sizes. */
assert(SC_LARGE_MINCLASS > usize);
return counter_rollback(tsdn, &prof_idump_accumulated,
SC_LARGE_MINCLASS - usize);
}
bool