]> git.karo-electronics.de Git - karo-tx-linux.git/commit
s390/debug: avoid function call for debug_sprintf_*
authorChristian Borntraeger <borntraeger@de.ibm.com>
Mon, 1 Dec 2014 08:16:45 +0000 (09:16 +0100)
committerMartin Schwidefsky <schwidefsky@de.ibm.com>
Mon, 8 Dec 2014 08:42:29 +0000 (09:42 +0100)
commit832a771034bf62444796ab8868264c3ea9e50866
tree40f2a4daa8cb86927e77c07eaae2c06b8e885b73
parented7d56e174b11b76e2954f28605c5c16f8814fab
s390/debug: avoid function call for debug_sprintf_*

debug_sprintf_event/exception are called even for debug events
with a disabling debug level. All other functions already do
the check in a wrapper function. Lets do the same here.
Due to the var_args the compiler rejects to make this function
inline. So let's wrap this via a macro.
This patch saves around 80 ns on my z196 for a KVM round trip (we
have two debug statements for entry and exit) when KVM is build as
a module.
The savings for built-in drivers is smaller as we then avoid the
PLT overhead for a function call.

Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
Reviewed-by: Michael Holzheu <holzheu@linux.vnet.ibm.com>
Reviewed-by: David Hildenbrand <dahi@linux.vnet.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
arch/s390/include/asm/debug.h
arch/s390/kernel/debug.c