All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stefan Hajnoczi <stefanha@redhat.com>
To: Markus Armbruster <armbru@redhat.com>
Cc: qemu-devel@nongnu.org, "Daniel P. Berrangé" <berrange@redhat.com>,
	"Mads Ynddal" <mads@ynddal.dk>,
	"Paolo Bonzini" <pbonzini@redhat.com>,
	"Alex Bennée" <alex.bennee@linaro.org>,
	"Peter Maydell" <peter.maydell@linaro.org>,
	"Philippe Mathieu-Daudé" <philmd@linaro.org>,
	"Greg Kurz" <groug@kaod.org>
Subject: Re: The different ways QEMU logs stuff
Date: Mon, 15 Sep 2025 10:29:05 -0400	[thread overview]
Message-ID: <20250915142905.GB69944@fedora> (raw)
In-Reply-To: <87bjnhgpg8.fsf@pond.sub.org>

[-- Attachment #1: Type: text/plain, Size: 1322 bytes --]

On Thu, Sep 11, 2025 at 02:10:15PM +0200, Markus Armbruster wrote:
> * Tracing vs. "log items"
> 
>   Tracing and "log items" both provide opt-in logging.
> 
>   Why do we have two?  Feels like an accident to me.
> 
>   When to use which?  I guess people pick whatever they're familiar
>   with.
> 
>   Would we be better off with just one?  I wish...
> 
>   Which one?  Clearly tracing, because tracing backends provide plenty
>   of useful functionality "log items" lack.
> 
>   "Log items" support per-thread log files.  With tracing, you could
>   instead split by thread names once Daniel's series is in.
> 
>   Address range filtering is only used with "log items".  It could just
>   as easily be used with tracing.

Paolo mentioned that tracing is structured (each event has typed
parameters) whereas logging consists of an arbitrary string. The reason
for this is that tracers are usually designed for low overhead and for
processing trace events. Tracing is used to instrument QEMU for detailed
analysis of control flow or performance investigation. It's a different
use case from logging although there is some overlap.

People like to use tools like perf(1), SystemTap, etc and tracing allows
QEMU to support them. It's not a use case where regular log files are
used.

Stefan

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

      parent reply	other threads:[~2025-09-15 14:30 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-09-11 12:10 The different ways QEMU logs stuff Markus Armbruster
2025-09-11 12:34 ` Daniel P. Berrangé
2025-09-11 12:36 ` Peter Maydell
2025-09-11 14:49 ` Paolo Bonzini
2025-09-11 18:30   ` Richard Henderson
2025-09-15 14:29 ` Stefan Hajnoczi [this message]

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=20250915142905.GB69944@fedora \
    --to=stefanha@redhat.com \
    --cc=alex.bennee@linaro.org \
    --cc=armbru@redhat.com \
    --cc=berrange@redhat.com \
    --cc=groug@kaod.org \
    --cc=mads@ynddal.dk \
    --cc=pbonzini@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=philmd@linaro.org \
    --cc=qemu-devel@nongnu.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.