]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MINOR: tools: resolve main() only once in resolve_sym_name()
authorWilly Tarreau <w@1wt.eu>
Thu, 21 Nov 2024 13:14:49 +0000 (14:14 +0100)
committerWilly Tarreau <w@1wt.eu>
Thu, 21 Nov 2024 18:58:06 +0000 (19:58 +0100)
commita205a91bb3daa8a84fa6b429c13d39563add950f
tree51f7400046bf3f869ac99107cc820a2a25499faf
parent9a8b834435863762ba4002e560b872ddb9056d58
MINOR: tools: resolve main() only once in resolve_sym_name()

resolv_sym_name() calls dladdr(main) for each symbol in order to compare
the first address with other symbols. But this is pointless and quite
expensive in outputs to "show profiling" for example. Let's just keep a
local copy and have a variable indicating if the resolution is needed/
in progress/done to save the value for subsequent calls.
src/tools.c