Do not reset sample wait time when re-initing tdata

This commit is contained in:
Yinan Zhang 2020-03-23 14:58:33 -07:00
parent 855d20f6f3
commit 1e2524e15a
3 changed files with 4 additions and 8 deletions

View File

@ -13,7 +13,7 @@ bool prof_data_init(tsd_t *tsd);
bool prof_dump(tsd_t *tsd, bool propagate_err, const char *filename, bool prof_dump(tsd_t *tsd, bool propagate_err, const char *filename,
bool leakcheck); bool leakcheck);
prof_tdata_t * prof_tdata_init_impl(tsd_t *tsd, uint64_t thr_uid, 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 prof_tdata_detach(tsd_t *tsd, prof_tdata_t *tdata);
void bt_init(prof_bt_t *bt, void **vec); void bt_init(prof_bt_t *bt, void **vec);
void prof_backtrace(tsd_t *tsd, prof_bt_t *bt); void prof_backtrace(tsd_t *tsd, prof_bt_t *bt);

View File

@ -795,7 +795,7 @@ prof_thr_uid_alloc(tsdn_t *tsdn) {
prof_tdata_t * prof_tdata_t *
prof_tdata_init(tsd_t *tsd) { prof_tdata_init(tsd_t *tsd) {
return prof_tdata_init_impl(tsd, prof_thr_uid_alloc(tsd_tsdn(tsd)), 0, 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 * prof_tdata_t *
@ -808,7 +808,7 @@ prof_tdata_reinit(tsd_t *tsd, prof_tdata_t *tdata) {
prof_tdata_detach(tsd, tdata); prof_tdata_detach(tsd, tdata);
return prof_tdata_init_impl(tsd, thr_uid, thr_discrim, thread_name, return prof_tdata_init_impl(tsd, thr_uid, thr_discrim, thread_name,
active, true); active);
} }
void void

View File

@ -1245,7 +1245,7 @@ prof_bt_keycomp(const void *k1, const void *k2) {
prof_tdata_t * prof_tdata_t *
prof_tdata_init_impl(tsd_t *tsd, uint64_t thr_uid, uint64_t thr_discrim, 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); assert(tsd_reentrancy_level_get(tsd) == 0);
prof_tdata_t *tdata; 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; return NULL;
} }
if (reset_interval) {
prof_sample_threshold_update(tsd);
}
tdata->enq = false; tdata->enq = false;
tdata->enq_idump = false; tdata->enq_idump = false;
tdata->enq_gdump = false; tdata->enq_gdump = false;