]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MINOR: tasks: also compute the tasklet latency when DEBUG_TASK is set
authorWilly Tarreau <w@1wt.eu>
Thu, 25 Feb 2021 07:39:07 +0000 (08:39 +0100)
committerWilly Tarreau <w@1wt.eu>
Thu, 25 Feb 2021 08:44:16 +0000 (09:44 +0100)
commitb2285de0493713f8572e8f2df3bd26f69021479b
tree1187a08dd59ab0d68b42f6413006371be265caa8
parent45499c56d30a00ada0dda5d96fac3bde293d0d5b
MINOR: tasks: also compute the tasklet latency when DEBUG_TASK is set

It is extremely useful to be able to observe the wakeup latency of some
important I/O operations, so let's accept to inflate the tasklet struct
by 8 extra bytes when DEBUG_TASK is set. With just this we have enough
to get live reports like this:

  $ socat - /tmp/sock1 <<< "show profiling"
  Per-task CPU profiling              : on      # set profiling tasks {on|auto|off}
  Tasks activity:
    function                      calls   cpu_tot   cpu_avg   lat_tot   lat_avg
    si_cs_io_cb                 8099492   4.833s    596.0ns   8.974m    66.48us
    h1_io_cb                    7460365   11.55s    1.548us   2.477m    19.92us
    process_stream              7383828   22.79s    3.086us   18.39m    149.5us
    h1_timeout_task                4157      -         -      348.4ms   83.81us
    srv_cleanup_toremove_connections751   39.70ms   52.86us   10.54ms   14.04us
    srv_cleanup_idle_connections     21   1.405ms   66.89us   30.82us   1.467us
    task_run_applet                  16   1.058ms   66.13us   446.2us   27.89us
    accept_queue_process              7   34.53us   4.933us   333.1us   47.58us
include/haproxy/task-t.h
include/haproxy/task.h
src/task.c