MINOR: task/profiling: do not record task_drop_running() as a caller
authorWilly Tarreau <w@1wt.eu>
Fri, 24 Nov 2023 15:45:34 +0000 (16:45 +0100)
committerWilly Tarreau <w@1wt.eu>
Mon, 27 Nov 2023 10:24:52 +0000 (11:24 +0100)
commitfc800b6cb72b0b7800a7cae202e75d52eccfd432
tree33c52843fc3c2e829522d7df20afd0d50d7de45d
parentb4eaadae84462d42f0b748b882d00c0c4f8d57e8
MINOR: task/profiling: do not record task_drop_running() as a caller

Task_drop_running() is used to remove the RUNNING bit and check if
while the task was running it got a new wakeup from itself. Thus
each time task_drop_running() marks itself as a caller, it in fact
removes the previous caller that woke up the task, such as below:

Tasks activity over 10.439 sec till 0.000 sec ago:
  function                      calls   cpu_tot   cpu_avg   lat_tot   lat_avg
  task_run_applet            57895273   6.396m    6.628us   2.733h    170.0us <- run_tasks_from_lists@src/task.c:658 task_drop_running

Better not mark this function as a caller and keep the original one:

Tasks activity over 13.834 sec till 0.000 sec ago:
  function                      calls   cpu_tot   cpu_avg   lat_tot   lat_avg
  task_run_applet            62424582   5.825m    5.599us   5.717h    329.7us <- sc_app_chk_rcv_applet@src/stconn.c:952 appctx_wakeup
include/haproxy/task-t.h
include/haproxy/task.h