mirror of
https://github.com/jemalloc/jemalloc.git
synced 2026-06-30 03:06:03 +03:00
Convert arena->prof_accumbytes synchronization to atomics.
This commit is contained in:
parent
b779522b9b
commit
fa2d64c94b
15 changed files with 128 additions and 59 deletions
14
src/prof.c
14
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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue