[thread_event] Add support for user events in thread events when stats are enabled

This commit is contained in:
Slobodan Predolac 2025-03-28 07:35:53 -07:00 committed by Guangli Dai
parent e6864c6075
commit 015b017973
15 changed files with 470 additions and 81 deletions

View file

@ -306,11 +306,6 @@ prof_sample_event_handler(tsd_t *tsd) {
}
}
static bool
prof_sample_enabled(void) {
return config_prof && opt_prof;
}
uint64_t
tsd_prof_sample_event_wait_get(tsd_t *tsd) {
#ifdef JEMALLOC_PROF
@ -321,6 +316,11 @@ tsd_prof_sample_event_wait_get(tsd_t *tsd) {
#endif
}
static te_enabled_t
prof_sample_enabled(void) {
return config_prof && opt_prof ? te_enabled_yes : te_enabled_no;
}
te_base_cb_t prof_sample_te_handler = {
.enabled = &prof_sample_enabled,
.new_event_wait = &prof_sample_new_event_wait,