REORG: thread: uninline the lock-debugging code
authorWilly Tarreau <w@1wt.eu>
Tue, 5 Oct 2021 16:39:27 +0000 (18:39 +0200)
committerWilly Tarreau <w@1wt.eu>
Wed, 6 Oct 2021 23:36:51 +0000 (01:36 +0200)
commit407ef893e72a2d57758dc493cfc1af12d8a9ef20
tree856db77293006254af9a66aba793cce1865d34e5
parentf14d19024bdbb7187f4dd8f459b888e93722378e
REORG: thread: uninline the lock-debugging code

The lock-debugging code in thread.h has no reason to be inlined. the
functions are quite fat and perform a lot of operations so there's no
saving keeping them inlined. Worse, most of them are in fact not
inlined, resulting in a significantly bigger executable.

This patch moves all this part from thread.h to thread.c. The functions
are still exported in thread.h of course. This results in ~166kB less
code:

     text    data     bss     dec     hex filename
  3165938   99424  897376 4162738  3f84b2 haproxy-before
  2991987   99424  897376 3988787  3cdd33 haproxy-after

In addition the build time with thread debugging enabled has shrunk
from 19.2 to 17.7s thanks to much less code to be parsed in thread.h
that is included virtually everywhere.
include/haproxy/thread.h
src/thread.c