qemu-log: Avoid function call for disabled qemu_log_mask logging
commit7ee606230e6b7645d92365d9b39179368e83ac54
authorPeter Maydell <peter.maydell@linaro.org>
Tue, 15 Mar 2016 18:12:03 +0000 (15 19:12 +0100)
committerPaolo Bonzini <pbonzini@redhat.com>
Tue, 22 Mar 2016 21:20:18 +0000 (22 22:20 +0100)
treec757b955f233c40337678b881623f303762621ba
parent541957361e0728c2ffe8330a712099cc872986a0
qemu-log: Avoid function call for disabled qemu_log_mask logging

Make qemu_log_mask() a macro which only calls the function to
do the actual work if the logging is enabled. This avoids making
a function call in possible fast paths where logging is disabled.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Andreas Färber <afaerber@suse.de>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
include/qemu/log.h
util/log.c