qemu-rust.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: BALATON Zoltan <balaton@eik.bme.hu>
To: Bernhard Beschow <shentey@gmail.com>
Cc: "Daniel P. Berrangé" <berrange@redhat.com>,
	qemu-devel@nongnu.org,
	"Manos Pitsidianakis" <manos.pitsidianakis@linaro.org>,
	qemu-rust@nongnu.org, "Paolo Bonzini" <pbonzini@redhat.com>
Subject: Re: [PATCH 2/2] rust/hw/char/pl011/src/device: Implement logging
Date: Wed, 2 Apr 2025 16:13:51 +0200 (CEST)	[thread overview]
Message-ID: <9296d4f2-c23b-e55e-b8d5-7f14f0eb15c1@eik.bme.hu> (raw)
In-Reply-To: <318E2A13-A163-434B-B18A-8A260CD3BC27@gmail.com>

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

On Wed, 2 Apr 2025, Bernhard Beschow wrote:
> Am 31. März 2025 09:18:05 UTC schrieb "Daniel P. Berrangé" <berrange@redhat.com>:
>> General conceptual question .....  I've never understood what the dividing
>> line is between use of 'qemu_log_mask' and trace points.
>
> I *think* it's the perspective: If you want to see any issues, 
> regardless of which device, use the -l option, i.e. qemu_log_mask(). If, 
> however, you want to see what a particular device does, use tracepoints.

I'd say that traces are like debug printfs that you don't normally want to 
see but may be interesting for developers for debugging a specific device 
model or QEMU part so you can enable the relevant ones for that device or 
part. Logs are something you want to notify the user or admin about and is 
not tracing internal operation of a device. But there may be some overlap 
as some logs could be converted to traces but they are under log for 
historical reasons as previously there were debug printfs controlled by 
defines in devices that were later converted to traces and logs that could 
be controlled in run time which were used for some traces before trace 
points existed. Then were probably kept as logs just to not change the 
command line because it's easier to type -d in_asm then say -trace 
enable="tcg_in_asm" or something like that.

Regards,
BALATON Zoltan

>> The latter can be
>> optionally built to feed into qemu log, as well as the other dynamic trace
>> backends.
>
> The use of qemu_log() in qemu_log_mask() seems like an implementation detail to me. Theoretically, qemu_log_mask() could use a different backend if this got implemented, and wouldn't require code changes throughout QEMU.
>
> Best regards,
> Bernhard
>
>>
>> Is there a compelling reason to use 'qemu_log', that isn't acceptable for
>> trace probe points ?
>>
>> This is an indirect way of asking whether qemu_log_mask should be exposed
>> to rust, or would exposing tracing be sufficient ?
>>
>> With regards,
>> Daniel
>
>

      parent reply	other threads:[~2025-04-02 15:21 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-03-30 20:58 [PATCH 0/2] Initial logging support for Rust Bernhard Beschow
2025-03-30 20:58 ` [PATCH 1/2] rust/qemu-api: Add initial logging support based on C API Bernhard Beschow
2025-03-31  9:53   ` Paolo Bonzini
2025-04-01 10:51     ` Bernhard Beschow
2025-04-08 20:58       ` Bernhard Beschow
2025-05-12 15:32         ` Paolo Bonzini
2025-05-19  8:13           ` Manos Pitsidianakis
2025-05-20  9:57             ` Paolo Bonzini
2025-06-10 20:51           ` Bernhard Beschow
2025-03-30 20:58 ` [PATCH 2/2] rust/hw/char/pl011/src/device: Implement logging Bernhard Beschow
2025-03-31  9:18   ` Daniel P. Berrangé
2025-04-02  9:33     ` Bernhard Beschow
2025-04-02 13:27       ` Daniel P. Berrangé
2025-04-03  9:46         ` Bernhard Beschow
2025-05-02 16:48         ` Peter Maydell
2025-05-08 17:14           ` Daniel P. Berrangé
2025-05-12 10:45             ` Peter Maydell
2025-04-02 14:13       ` BALATON Zoltan [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=9296d4f2-c23b-e55e-b8d5-7f14f0eb15c1@eik.bme.hu \
    --to=balaton@eik.bme.hu \
    --cc=berrange@redhat.com \
    --cc=manos.pitsidianakis@linaro.org \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-rust@nongnu.org \
    --cc=shentey@gmail.com \
    /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).