summaryrefslogtreecommitdiffstats
path: root/src/prof.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/prof.c')
-rw-r--r--src/prof.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/prof.c b/src/prof.c
index 5aeefb2..13fa20d 100644
--- a/src/prof.c
+++ b/src/prof.c
@@ -1753,6 +1753,20 @@ prof_fdump(void) {
prof_dump(tsd, false, filename, opt_prof_leak);
}
+bool
+prof_accum_init(tsdn_t *tsdn, prof_accum_t *prof_accum) {
+ cassert(config_prof);
+
+#ifndef JEMALLOC_ATOMIC_U64
+ if (malloc_mutex_init(&prof_accum->mtx, "prof_accum",
+ WITNESS_RANK_PROF_ACCUM)) {
+ return true;
+ }
+#endif
+ prof_accum->accumbytes = 0;
+ return false;
+}
+
void
prof_idump(tsdn_t *tsdn) {
tsd_t *tsd;