qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [RFC PATCH v1 1/4] qemu-log: Allow checking of the curr


From: Peter Maydell
Subject: Re: [Qemu-devel] [RFC PATCH v1 1/4] qemu-log: Allow checking of the current mask
Date: Sun, 3 Mar 2013 10:32:14 +0000

On 3 March 2013 06:13, Peter Crosthwaite <address@hidden> wrote:
> Useful for heavy users of qemu_log_mask that want to avoid executing expensive
> logic that sets up a qemu_log_mask when that mask is disabled. E.G.
>
> if (qemu_log_get_mask() && LOG_GUEST_ERROR) {
>         /* do my expensive logging data query */
> }
> qemu_log_mask(LOG_GUEST_ERROR, ...)

Why can't you use the existing
  if (qemu_loglevel_mask(LOG_GUEST_ERROR) {
      /* expensive thing */
  }
?

-- PMM



reply via email to

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