Check prof_active in addtion to opt_prof during batch_alloc().

This commit is contained in:
Qi Wang 2021-11-11 20:35:37 -08:00 committed by Qi Wang
parent 37342a4d32
commit 6bdb4f5ab0

View File

@ -4000,6 +4000,7 @@ batch_alloc(void **ptrs, size_t num, size_t size, int flags) {
size_t batch = num - filled; size_t batch = num - filled;
size_t surplus = SIZE_MAX; /* Dead store. */ size_t surplus = SIZE_MAX; /* Dead store. */
bool prof_sample_event = config_prof && opt_prof bool prof_sample_event = config_prof && opt_prof
&& prof_active_get_unlocked()
&& te_prof_sample_event_lookahead_surplus(tsd, && te_prof_sample_event_lookahead_surplus(tsd,
batch * usize, &surplus); batch * usize, &surplus);