qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 5/9] log: improve performance of qemu_log and qe


From: Denis V. Lunev
Subject: Re: [Qemu-devel] [PATCH 5/9] log: improve performance of qemu_log and qemu_log_mask if disabled
Date: Mon, 14 Mar 2016 18:07:06 +0300
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.5.1

On 03/14/2016 05:30 PM, Paolo Bonzini wrote:

On 14/03/2016 12:21, Denis V. Lunev wrote:
The patch is intended to avoid to perform any operation including
calculation of log function arguments when the log is not enabled due to
various reasons.

Functions qemu_log and qemu_log_mask are replaced with variadic macros.

Format checking performed by compiler will not suffer by this patch. It
will be done inside in fprintf arguments checking.
Have you encountered a place that was calling them so hard that it
caused performance problem?  If so, the logging should probably be
replaced by a tracepoint.

Paolo


inline functions can have side-effects, i.e. the arguments of them
can be evaluated depending on the compiler. with this approach
we are sure that this will not happen, ever.

Den



reply via email to

[Prev in Thread] Current Thread [Next in Thread]