Add prof stats mutex stats

This commit is contained in:
Yinan Zhang 2020-12-28 14:47:50 -08:00
parent 9f71b5779b
commit 14d689c0f9
2 changed files with 5 additions and 1 deletions

View File

@ -13,7 +13,8 @@
OP(prof_thds_data) \ OP(prof_thds_data) \
OP(prof_dump) \ OP(prof_dump) \
OP(prof_recent_alloc) \ OP(prof_recent_alloc) \
OP(prof_recent_dump) OP(prof_recent_dump) \
OP(prof_stats)
typedef enum { typedef enum {
#define OP(mtx) global_prof_mutex_##mtx, #define OP(mtx) global_prof_mutex_##mtx,

View File

@ -1280,6 +1280,8 @@ ctl_refresh(tsdn_t *tsdn) {
READ_GLOBAL_MUTEX_PROF_DATA( READ_GLOBAL_MUTEX_PROF_DATA(
global_prof_mutex_prof_recent_dump, global_prof_mutex_prof_recent_dump,
prof_recent_dump_mtx); prof_recent_dump_mtx);
READ_GLOBAL_MUTEX_PROF_DATA(
global_prof_mutex_prof_stats, prof_stats_mtx);
} }
if (have_background_thread) { if (have_background_thread) {
READ_GLOBAL_MUTEX_PROF_DATA( READ_GLOBAL_MUTEX_PROF_DATA(
@ -3395,6 +3397,7 @@ stats_mutexes_reset_ctl(tsd_t *tsd, const size_t *mib,
MUTEX_PROF_RESET(prof_dump_mtx); MUTEX_PROF_RESET(prof_dump_mtx);
MUTEX_PROF_RESET(prof_recent_alloc_mtx); MUTEX_PROF_RESET(prof_recent_alloc_mtx);
MUTEX_PROF_RESET(prof_recent_dump_mtx); MUTEX_PROF_RESET(prof_recent_dump_mtx);
MUTEX_PROF_RESET(prof_stats_mtx);
} }
/* Per arena mutexes. */ /* Per arena mutexes. */