From 1e2524e15a004af50fd79f79b4b6efcfce0164b8 Mon Sep 17 00:00:00 2001 From: Yinan Zhang Date: Mon, 23 Mar 2020 14:58:33 -0700 Subject: [PATCH] Do not reset sample wait time when re-initing tdata --- include/jemalloc/internal/prof_data.h | 2 +- src/prof.c | 4 ++-- src/prof_data.c | 6 +----- 3 files changed, 4 insertions(+), 8 deletions(-) diff --git a/include/jemalloc/internal/prof_data.h b/include/jemalloc/internal/prof_data.h index 95dc6b0b..46a35105 100644 --- a/include/jemalloc/internal/prof_data.h +++ b/include/jemalloc/internal/prof_data.h @@ -13,7 +13,7 @@ bool prof_data_init(tsd_t *tsd); bool prof_dump(tsd_t *tsd, bool propagate_err, const char *filename, bool leakcheck); prof_tdata_t * prof_tdata_init_impl(tsd_t *tsd, uint64_t thr_uid, - uint64_t thr_discrim, char *thread_name, bool active, bool reset_interval); + uint64_t thr_discrim, char *thread_name, bool active); void prof_tdata_detach(tsd_t *tsd, prof_tdata_t *tdata); void bt_init(prof_bt_t *bt, void **vec); void prof_backtrace(tsd_t *tsd, prof_bt_t *bt); diff --git a/src/prof.c b/src/prof.c index c1e13e91..2e1d7689 100644 --- a/src/prof.c +++ b/src/prof.c @@ -795,7 +795,7 @@ prof_thr_uid_alloc(tsdn_t *tsdn) { prof_tdata_t * prof_tdata_init(tsd_t *tsd) { return prof_tdata_init_impl(tsd, prof_thr_uid_alloc(tsd_tsdn(tsd)), 0, - NULL, prof_thread_active_init_get(tsd_tsdn(tsd)), false); + NULL, prof_thread_active_init_get(tsd_tsdn(tsd))); } prof_tdata_t * @@ -808,7 +808,7 @@ prof_tdata_reinit(tsd_t *tsd, prof_tdata_t *tdata) { prof_tdata_detach(tsd, tdata); return prof_tdata_init_impl(tsd, thr_uid, thr_discrim, thread_name, - active, true); + active); } void diff --git a/src/prof_data.c b/src/prof_data.c index 9721cbe7..66ed36a0 100644 --- a/src/prof_data.c +++ b/src/prof_data.c @@ -1245,7 +1245,7 @@ prof_bt_keycomp(const void *k1, const void *k2) { prof_tdata_t * prof_tdata_init_impl(tsd_t *tsd, uint64_t thr_uid, uint64_t thr_discrim, - char *thread_name, bool active, bool reset_interval) { + char *thread_name, bool active) { assert(tsd_reentrancy_level_get(tsd) == 0); prof_tdata_t *tdata; @@ -1274,10 +1274,6 @@ prof_tdata_init_impl(tsd_t *tsd, uint64_t thr_uid, uint64_t thr_discrim, return NULL; } - if (reset_interval) { - prof_sample_threshold_update(tsd); - } - tdata->enq = false; tdata->enq_idump = false; tdata->enq_gdump = false;