]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MINOR: tools: add a new function "resolve_dso_name" to find a symbol's DSO
authorWilly Tarreau <w@1wt.eu>
Thu, 21 Nov 2024 14:15:53 +0000 (15:15 +0100)
committerWilly Tarreau <w@1wt.eu>
Thu, 21 Nov 2024 18:58:06 +0000 (19:58 +0100)
commit670507a66ebd3659ac3a7473e565819f41f2dfd1
treeae49b6e2f241a1a570e1183cb3fccbab14f66843
parenta205a91bb3daa8a84fa6b429c13d39563add950f
MINOR: tools: add a new function "resolve_dso_name" to find a symbol's DSO

In the memprofile summary per DSO, we currently have to pay a high price
by calling dladdr() on each symbol when doing the summary per DSO at the
end, while we're not interested in these details, we just want the DSO
name which can be made cheaper to obtain, and easier to manipulate. So
let's create resolve_dso_name() to only extract minimal information from
an address. At the moment it still uses dladdr() though it avoids all the
extra expensive work, and will further be able to leverage the same
mechanism as "show libs" to instantly spot DSO from address ranges.
include/haproxy/tools.h
src/tools.c