mirror of
https://github.com/jemalloc/jemalloc.git
synced 2026-07-23 13:13:06 +00:00
Initialize prof idump counter once rather than once per arena
This commit is contained in:
@@ -641,8 +641,8 @@ prof_fdump(void) {
|
||||
prof_dump(tsd, false, filename, opt_prof_leak);
|
||||
}
|
||||
|
||||
bool
|
||||
prof_accum_init(void) {
|
||||
static bool
|
||||
prof_idump_accum_init(void) {
|
||||
cassert(config_prof);
|
||||
|
||||
return counter_accum_init(&prof_idump_accumulated, prof_interval);
|
||||
@@ -1021,6 +1021,10 @@ prof_boot2(tsd_t *tsd, base_t *base) {
|
||||
return true;
|
||||
}
|
||||
|
||||
if (prof_idump_accum_init()) {
|
||||
return true;
|
||||
}
|
||||
|
||||
if (malloc_mutex_init(&prof_dump_filename_mtx, "prof_dump_filename",
|
||||
WITNESS_RANK_PROF_DUMP_FILENAME, malloc_mutex_rank_exclusive)) {
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user