]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MINOR: debug: add a new debug macro COUNT_IF()
authorWilly Tarreau <w@1wt.eu>
Mon, 21 Oct 2024 16:34:21 +0000 (18:34 +0200)
committerWilly Tarreau <w@1wt.eu>
Mon, 21 Oct 2024 17:14:07 +0000 (19:14 +0200)
commitda66c42f657855ec13f918ce37c9431cb2922e8d
treefa812280210df45852759a3badf1789d40f83a85
parent776fd03509cec5b8fe5a54aeac0370aabc15d313
MINOR: debug: add a new debug macro COUNT_IF()

This macro works exactly like BUG_ON() except that it never logs anything
nor crashes, it only implements an atomic counter that is incremented on
every call. This can be used to count a number of unlikely events that are
worth checking at run time on setups showing unusual and unreproducible
behaviors.
include/haproxy/bug.h