diff options
author | Peter Maydell <peter.maydell@linaro.org> | 2016-03-15 19:12:03 +0100 |
---|---|---|
committer | Timothy Pearson <tpearson@raptorengineering.com> | 2019-11-29 19:55:13 -0600 |
commit | cef426037c9071b4f6f1e81451252ce60f420e65 (patch) | |
tree | fde0dba0b80d888afa5a96f016cf755df25f1ef5 /util/log.c | |
parent | 3d4b9a2ee5d8e738b593112c90a480440f9eae78 (diff) | |
download | hqemu-cef426037c9071b4f6f1e81451252ce60f420e65.zip hqemu-cef426037c9071b4f6f1e81451252ce60f420e65.tar.gz |
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>
Diffstat (limited to 'util/log.c')
-rw-r--r-- | util/log.c | 11 |
1 files changed, 0 insertions, 11 deletions
@@ -38,17 +38,6 @@ void qemu_log(const char *fmt, ...) va_end(ap); } -void qemu_log_mask(int mask, const char *fmt, ...) -{ - va_list ap; - - va_start(ap, fmt); - if ((qemu_loglevel & mask) && qemu_logfile) { - vfprintf(qemu_logfile, fmt, ap); - } - va_end(ap); -} - /* enable or disable low levels log */ void do_qemu_set_log(int log_flags, bool use_own_buffers) { |