]> git.kaiwu.me - haproxy.git/commit
MINOR: connection: track mux calls to report their allocation context
authorWilly Tarreau <w@1wt.eu>
Wed, 11 Mar 2026 09:28:25 +0000 (10:28 +0100)
committerWilly Tarreau <w@1wt.eu>
Thu, 12 Mar 2026 17:06:38 +0000 (18:06 +0100)
commitec7b07b65045a0f1a8e7ca735d29562e79bfb1c6
tree8405ae1b4857a00829c1d4775b5ce60dd7d80df0
parente8e4449985962d62a222c81cccdf12dae32b34fe
MINOR: connection: track mux calls to report their allocation context

Most calls to mux ops were instrumented with a CALL_MUX_WITH_RET() or
CALL_MUX_NO_RET() macro in order to make the current thread's context
point to the called mux and be able to track its allocations. Only
a bunch of harmless mux_ctl() and ->subscribe/unsubscribe calls were
left untouched since useless. But destroy/detach/shut/init/snd_buf
and rcv_buf are now tracked.

It will not show allocations performed in IO callback via tasklet
wakeups however.

In order to ease reading of the output, cmp_memprof_ctx() knows about
muxes and sorts based on the .subscribe function address instead of
the mux_ops address so as to keep various callers grouped.
21 files changed:
include/haproxy/connection.h
include/haproxy/stconn.h
include/haproxy/tinfo-t.h
src/activity.c
src/backend.c
src/connection.c
src/haterm.c
src/mux_fcgi.c
src/mux_h1.c
src/mux_h2.c
src/mux_spop.c
src/proto_rhttp.c
src/quic_rx.c
src/quic_ssl.c
src/server.c
src/session.c
src/ssl_sock.c
src/stconn.c
src/tcpcheck.c
src/tools.c
src/xprt_handshake.c