#include <import/eb32tree.h>
-#include <haproxy/activity.h>
#include <haproxy/api.h>
#include <haproxy/clock.h>
#include <haproxy/fd.h>
#endif
}
- if (_HA_ATOMIC_LOAD(&th_ctx->flags) & TH_FL_TASK_PROFILING)
- tl->wake_date = now_mono_time();
__tasklet_wakeup_on(tl, thr);
}
#endif
}
- if (_HA_ATOMIC_LOAD(&th_ctx->flags) & TH_FL_TASK_PROFILING)
- t->wake_date = now_mono_time();
__tasklet_wakeup_on((struct tasklet *)t, thr);
}
#endif
}
- if (th_ctx->flags & TH_FL_TASK_PROFILING)
- tl->wake_date = now_mono_time();
return __tasklet_wakeup_after(head, tl);
}
{
if (likely(thr < 0)) {
/* this tasklet runs on the caller thread */
+ if (_HA_ATOMIC_LOAD(&th_ctx->flags) & TH_FL_TASK_PROFILING)
+ tl->wake_date = now_mono_time();
+
if (tl->state & TASK_HEAVY) {
LIST_APPEND(&th_ctx->tasklets[TL_HEAVY], &tl->list);
th_ctx->tl_class_mask |= 1 << TL_HEAVY;
_HA_ATOMIC_INC(&th_ctx->rq_total);
} else {
/* this tasklet runs on a specific thread. */
+ if (_HA_ATOMIC_LOAD(&ha_thread_ctx[thr].flags) & TH_FL_TASK_PROFILING)
+ tl->wake_date = now_mono_time();
+
MT_LIST_APPEND(&ha_thread_ctx[thr].shared_tasklet_list, list_to_mt_list(&tl->list));
_HA_ATOMIC_INC(&ha_thread_ctx[thr].rq_total);
wake_thread(thr);
struct list *__tasklet_wakeup_after(struct list *head, struct tasklet *tl)
{
BUG_ON(tl->tid >= 0 && tid != tl->tid);
+
+ if (_HA_ATOMIC_LOAD(&th_ctx->flags) & TH_FL_TASK_PROFILING)
+ tl->wake_date = now_mono_time();
+
/* this tasklet runs on the caller thread */
if (!head) {
if (tl->state & TASK_HEAVY) {