[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 b2a35a905f
commit 390e70c840
15 changed files with 470 additions and 81 deletions
+3 -3
View File
@@ -27,7 +27,7 @@ prof_threshold_hook_get(void) {
}
/* Invoke callback for threshold reached */
static void
static inline void
prof_threshold_update(tsd_t *tsd) {
prof_threshold_hook_t prof_threshold_hook = prof_threshold_hook_get();
if (prof_threshold_hook == NULL) {
@@ -56,9 +56,9 @@ prof_threshold_event_handler(tsd_t *tsd) {
prof_threshold_update(tsd);
}
static bool
static te_enabled_t
prof_threshold_enabled(void) {
return config_stats;
return config_stats ? te_enabled_yes : te_enabled_no;
}
te_base_cb_t prof_threshold_te_handler = {