server: Use GCC hints to move debug and error handling code out of hot paths.
commit2ec573667b817c6a8b3515f53643770e415191cb
authorRichard W.M. Jones <rjones@redhat.com>
Sat, 2 Nov 2019 07:31:44 +0000 (2 07:31 +0000)
committerRichard W.M. Jones <rjones@redhat.com>
Sat, 2 Nov 2019 07:39:19 +0000 (2 07:39 +0000)
tree14c68c1b4c8bb7bd5b74c8653415a17184f59f5b
parentc3d39389517479242d4df84dfbac1751187233a4
server: Use GCC hints to move debug and error handling code out of hot paths.

For GCC only, define unlikely() macro.  Use it on error paths to move
code out of the hot path.

In the server only, use the debug() macro (don't call nbdkit_debug
directly).  This macro checks the verbose flag and moves the call to
nbdkit_debug out of the hot path.
server/connections.c
server/internal.h
server/plugins.c
server/protocol.c
server/sockets.c