qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: Manos Pitsidianakis <manos.pitsidianakis@linaro.org>
Cc: qemu-devel@nongnu.org, tanishdesai37@gmail.com,
	stefanha@redhat.com, berrange@redhat.com, mads@ynddal.dk
Subject: Re: [PATCH 06/14] tracetool: Add Rust format support
Date: Mon, 25 Aug 2025 11:42:38 +0200	[thread overview]
Message-ID: <c7ee800a-a1e3-4c73-a157-501f872d3311@redhat.com> (raw)
In-Reply-To: <CAAjaMXb=HseHy3vW+5W+f2uVR01c0NV9QKmOhQuB7BkW0Topkg@mail.gmail.com>

On 8/25/25 09:03, Manos Pitsidianakis wrote:
>> +def expand_format_string(c_fmt, prefix=""):
> 
> (Pedantic comment) let's put type annotations in function signatures
> when possible, these seem to handle `str` mostly so this should be
> simple. This should catch basic errors like passing/returning `str |
> None` or wrong types altogether.

Not pedantic, I have a full conversion of tracetool to add mypy 
annotations... but it's on top of these patches. :)

I can reorder them and post the conversion first, depending on what the 
maintainers prefer.

>> @@ -0,0 +1,76 @@
>> +# -*- coding: utf-8 -*-
> 
> This was probably copied verbatim from other tracetool files, but IIUC
> it's not needed, utf-8 is the default encoding if there's no `coding`
> declaration.
> 
> Also, missing SPDX header as a new file

Ok I can do that for all files, too.

>> +        if "tcg-exec" in e.properties:
>> +            # a single define for the two "sub-events"
>> +            out('const _TRACE_%(name)s_ENABLED: bool = %(enabled)s;',
>> +                name=e.original.name.upper(),
> 
> What's the difference between e.original.name and e.name?

Good point---anything to do with e.original is dead code.  I'll add a 
patch in front to drop it.

Paolo



  reply	other threads:[~2025-08-25  9:43 UTC|newest]

Thread overview: 47+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-08-22 12:26 [RFC PATCH 00/14] tracetool: add Rust support Paolo Bonzini
2025-08-22 12:26 ` [PATCH 01/14] treewide: write "unsigned long int" instead of "long unsigned int" Paolo Bonzini
2025-08-25  6:40   ` Manos Pitsidianakis
2025-08-25  9:18     ` Paolo Bonzini
2025-08-25  7:24   ` Zhao Liu
2025-08-26 11:15     ` Daniel P. Berrangé
2025-08-26 11:33       ` Peter Maydell
2025-08-22 12:26 ` [PATCH 02/14] rust: move dependencies to rust/Cargo.toml Paolo Bonzini
2025-08-25  7:04   ` Manos Pitsidianakis
2025-08-25  7:24   ` Zhao Liu
2025-08-27 19:12   ` Stefan Hajnoczi
2025-08-22 12:26 ` [PATCH 03/14] trace/ftrace: move snprintf+write from tracepoints to ftrace.c Paolo Bonzini
2025-08-25  7:09   ` Manos Pitsidianakis
2025-08-25  9:00   ` Zhao Liu
2025-08-26 11:40   ` Daniel P. Berrangé
2025-08-26 11:45     ` Peter Maydell
2025-08-26 11:58       ` Daniel P. Berrangé
2025-08-27 19:12   ` Stefan Hajnoczi
2025-08-22 12:26 ` [PATCH 04/14] tracetool: add CHECK_TRACE_EVENT_GET_STATE Paolo Bonzini
2025-08-26 11:44   ` Daniel P. Berrangé
2025-08-27 19:13   ` Stefan Hajnoczi
2025-08-22 12:26 ` [PATCH 05/14] tracetool/backend: remove redundant trace event checks Paolo Bonzini
2025-08-26 11:44   ` Daniel P. Berrangé
2025-08-27 19:15   ` Stefan Hajnoczi
2025-08-22 12:26 ` [PATCH 06/14] tracetool: Add Rust format support Paolo Bonzini
2025-08-25  7:03   ` Manos Pitsidianakis
2025-08-25  9:42     ` Paolo Bonzini [this message]
2025-08-25  7:22   ` Manos Pitsidianakis
2025-08-26 11:49   ` Daniel P. Berrangé
2025-08-22 12:26 ` [PATCH 07/14] rust: add trace crate Paolo Bonzini
2025-08-25  7:18   ` Manos Pitsidianakis
2025-08-25  9:54   ` Zhao Liu
2025-08-22 12:26 ` [PATCH 08/14] rust: qdev: add minimal clock bindings Paolo Bonzini
2025-08-25  7:50   ` Zhao Liu
2025-08-25  7:32     ` Manos Pitsidianakis
2025-08-25  9:58       ` Paolo Bonzini
2025-08-22 12:26 ` [PATCH 09/14] rust: pl011: add tracepoints Paolo Bonzini
2025-08-22 12:26 ` [PATCH 10/14] tracetool/simple: add Rust support Paolo Bonzini
2025-08-26 11:53   ` Daniel P. Berrangé
2025-09-19 10:51     ` Paolo Bonzini
2025-08-22 12:26 ` [PATCH 11/14] log: change qemu_loglevel to unsigned Paolo Bonzini
2025-08-25  7:07   ` Manos Pitsidianakis
2025-08-25  7:56   ` Zhao Liu
2025-08-26 13:52   ` Philippe Mathieu-Daudé
2025-08-22 12:26 ` [PATCH 12/14] tracetool/log: add Rust support Paolo Bonzini
2025-08-22 12:26 ` [PATCH 13/14] tracetool/ftrace: " Paolo Bonzini
2025-08-22 12:26 ` [PATCH 14/14] tracetool/syslog: " Paolo Bonzini

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=c7ee800a-a1e3-4c73-a157-501f872d3311@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=berrange@redhat.com \
    --cc=mads@ynddal.dk \
    --cc=manos.pitsidianakis@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=stefanha@redhat.com \
    --cc=tanishdesai37@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).