]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MEDIUM: activity: apply and use new finegrained task profiling settings
authorWilly Tarreau <w@1wt.eu>
Tue, 10 Feb 2026 13:17:36 +0000 (14:17 +0100)
committerWilly Tarreau <w@1wt.eu>
Tue, 10 Feb 2026 16:52:59 +0000 (17:52 +0100)
commite2631ee5f7a1d10b403238ea45d2ff577794de79
tree3657f33854bb8788f535d219b60caba25d20c79c
parenta7b2353cb35a915b7207f5f077035906fbf9c861
MEDIUM: activity: apply and use new finegrained task profiling settings

In continuity of previous patch, this one makes use of the new profiling
flags. For this, based on the global "profiling" setting, when switching
profiling on, we set or clear two flags on the thread context,
TH_FL_TASK_PROFILING_L and TH_FL_TASK_PROFILING_M to indicate whether
lock profiling and/or malloc profiling are desired when profiling is
enabled. These flags are checked along with TH_FL_TASK_PROFILING to
decide when to collect time around a lock or a malloc. And by default
we're back to the behavior of 3.2 in that neither lock nor malloc times
are collected anymore.

This is sufficient to see the CPU usage spent in the VDSO to significantly
drop from 22% to 2.2% on a highly loaded system.

This should be backported to 3.3 along with the previous patch.
include/haproxy/thread.h
include/haproxy/tinfo-t.h
src/activity.c
src/pool.c