]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MINOR: threads/build: atomic: replace the few inlines with macros
authorWilly Tarreau <w@1wt.eu>
Mon, 20 Nov 2017 19:55:06 +0000 (20:55 +0100)
committerWilly Tarreau <w@1wt.eu>
Mon, 20 Nov 2017 20:06:35 +0000 (21:06 +0100)
commitb5f271555e9b86e60d60a6986a23c82adbde05fb
treeebb4af01fe1aba0780314ae91e1016d309cf8858
parentd0d8ba59d3334d51f9b9f3f8c1179747d2553564
MINOR: threads/build: atomic: replace the few inlines with macros

[ plock commit 61e255286ae32e83e1a3174dd7c49eda99880a8b]

There are a few inlines such as pl_barrier() and pl_cpu_relax() which
are used a lot. Unfortunately, while building test code at -O0, inlining
is disabled and these ones are called a lot and show up a lot in any
profile, are traced into when single-stepping with a debugger, etc, thus
they are polluting the landscape. Since they're single-asm statements,
there is no reason for not turning them into macros.

The result becomes fairly visible here at -O0 :

  $ size latency.inline latency.macro
     text    data     bss     dec     hex filename
    11431     692     656   12779    31eb treelock.inline
    10967     692     656   12315    301b treelock.macro

And it was verified that regularly optimized code remains strictly identical.
include/import/atomic-ops.h