From 397f54aa460593295139e94c81e8f5b2152a088f Mon Sep 17 00:00:00 2001 From: Jason Evans Date: Sun, 29 Jan 2017 17:35:57 -0800 Subject: [PATCH] Conditionalize prof fork handling on config_prof. This allows the compiler to completely remove dead code. --- src/prof.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/prof.c b/src/prof.c index 1dd0f54d..28d30f29 100644 --- a/src/prof.c +++ b/src/prof.c @@ -2353,7 +2353,7 @@ prof_boot2(tsd_t *tsd) { void prof_prefork0(tsdn_t *tsdn) { - if (opt_prof) { + if (config_prof && opt_prof) { unsigned i; malloc_mutex_prefork(tsdn, &prof_dump_mtx); @@ -2370,7 +2370,7 @@ prof_prefork0(tsdn_t *tsdn) { void prof_prefork1(tsdn_t *tsdn) { - if (opt_prof) { + if (config_prof && opt_prof) { malloc_mutex_prefork(tsdn, &prof_active_mtx); malloc_mutex_prefork(tsdn, &prof_dump_seq_mtx); malloc_mutex_prefork(tsdn, &prof_gdump_mtx); @@ -2381,7 +2381,7 @@ prof_prefork1(tsdn_t *tsdn) { void prof_postfork_parent(tsdn_t *tsdn) { - if (opt_prof) { + if (config_prof && opt_prof) { unsigned i; malloc_mutex_postfork_parent(tsdn, @@ -2404,7 +2404,7 @@ prof_postfork_parent(tsdn_t *tsdn) { void prof_postfork_child(tsdn_t *tsdn) { - if (opt_prof) { + if (config_prof && opt_prof) { unsigned i; malloc_mutex_postfork_child(tsdn, &prof_thread_active_init_mtx);