|
From: | Richard Henderson |
Subject: | Re: [Qemu-devel] [PATCH v2 00/15] Debug output revamp |
Date: | Thu, 21 Feb 2013 08:10:35 -0800 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130110 Thunderbird/17.0.2 |
On 2013-02-20 20:24, Andreas Färber wrote:
v2 replaces macros with static functions, adopting Scott's scheme of const variables set through #ifdefs (keeping their defined() semantics) and adopting Anthony's proposal of using va_list for argument passing. v1 had changed some #ifdefs into ifs due to the #ifdef -> #if change; while not strictly necessary anymore, I have not reverted this (mostly sparc).
Sorry I missed the discussion that must have went into v1, but I'm not thrilled about this.
My gcc intuition says that varargs means that inlining won't happen, and that static const means that the code won't be deleted as dead at compile time. Which means that we're going to have more overhead both when the debugging is disabled and when it is enabled.
Is there an especially good reason why we're not still using a macro, but one controlled by an if (0) when debugging is disabled? r~
[Prev in Thread] | Current Thread | [Next in Thread] |