qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Peter Maydell <peter.maydell@linaro.org>
To: "Alex Bennée" <alex.bennee@linaro.org>
Cc: Paolo Bonzini <pbonzini@redhat.com>,
	QEMU Developers <qemu-devel@nongnu.org>,
	Richard Henderson <rth@twiddle.net>
Subject: Re: [RFC PATCH] logging: add a LOG_TCG_WARN for temp leaks
Date: Thu, 11 Jun 2020 15:49:36 +0100	[thread overview]
Message-ID: <CAFEAcA_joU24OSa8fwbNFb1XMb-FKfcaY4xpjV9EHUdCbWZzwg@mail.gmail.com> (raw)
In-Reply-To: <20200611144531.20142-1-alex.bennee@linaro.org>

On Thu, 11 Jun 2020 at 15:45, Alex Bennée <alex.bennee@linaro.org> wrote:
>
> Pretty much all calls to qemu_log are either wrapped in some other
> enabling check or only enabled with debug defines. Add a specific flag
> for TCG warnings and expand the documentation of the qemu_log
> function.
>
> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
> Cc: Peter Maydell <peter.maydell@linaro.org>
> ---

> -/* main logging function */
> +/**
> + * qemu_log: main logging function
> + *
> + * Most users shouldn't be calling qemu_log unconditionally as it adds
> + * noise to logging output. Either use qemu_log_mask() or wrap
> + * successive log calls a qemu_loglevel_mask() check and
"inside a"

> + * qemu_log_lock/unlock(). The tracing infrastructure does similar wrapping.
> + */
>  int GCC_FMT_ATTR(1, 2) qemu_log(const char *fmt, ...);

> +/* Additional TCG warnings */
> +#define LOG_TCG_WARN       (1 << 20)

I don't object to the new log group in principle, but it has exactly
one warning in it. I feel we'd be better to check for all the current
places that use qemu_log not inside a loglevel_mask condition (or
which use fprintf, if we still have those) and then see what the
most reasonable categorization is.

thanks
-- PMM


  reply	other threads:[~2020-06-11 14:53 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-11 14:45 [RFC PATCH] logging: add a LOG_TCG_WARN for temp leaks Alex Bennée
2020-06-11 14:49 ` Peter Maydell [this message]
2020-06-11 16:22   ` Alex Bennée
2020-06-11 15:12 ` Philippe Mathieu-Daudé

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAFEAcA_joU24OSa8fwbNFb1XMb-FKfcaY4xpjV9EHUdCbWZzwg@mail.gmail.com \
    --to=peter.maydell@linaro.org \
    --cc=alex.bennee@linaro.org \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=rth@twiddle.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).