mirror of
https://github.com/jemalloc/jemalloc.git
synced 2026-04-22 19:02:13 +03:00
Add lock to protect prof last-N dumping
This commit is contained in:
parent
a835d9cf85
commit
3e19ebd2ea
4 changed files with 33 additions and 17 deletions
|
|
@ -1116,6 +1116,7 @@ prof_prefork0(tsdn_t *tsdn) {
|
|||
for (i = 0; i < PROF_NCTX_LOCKS; i++) {
|
||||
malloc_mutex_prefork(tsdn, &gctx_locks[i]);
|
||||
}
|
||||
malloc_mutex_prefork(tsdn, &prof_recent_dump_mtx);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1145,6 +1146,7 @@ prof_postfork_parent(tsdn_t *tsdn) {
|
|||
malloc_mutex_postfork_parent(tsdn, &prof_dump_filename_mtx);
|
||||
malloc_mutex_postfork_parent(tsdn, &prof_active_mtx);
|
||||
counter_postfork_parent(tsdn, &prof_idump_accumulated);
|
||||
malloc_mutex_postfork_parent(tsdn, &prof_recent_dump_mtx);
|
||||
for (i = 0; i < PROF_NCTX_LOCKS; i++) {
|
||||
malloc_mutex_postfork_parent(tsdn, &gctx_locks[i]);
|
||||
}
|
||||
|
|
@ -1170,6 +1172,7 @@ prof_postfork_child(tsdn_t *tsdn) {
|
|||
malloc_mutex_postfork_child(tsdn, &prof_dump_filename_mtx);
|
||||
malloc_mutex_postfork_child(tsdn, &prof_active_mtx);
|
||||
counter_postfork_child(tsdn, &prof_idump_accumulated);
|
||||
malloc_mutex_postfork_child(tsdn, &prof_recent_dump_mtx);
|
||||
for (i = 0; i < PROF_NCTX_LOCKS; i++) {
|
||||
malloc_mutex_postfork_child(tsdn, &gctx_locks[i]);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue