From: "Daniel P. Berrangé" <berrange@redhat.com>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: qemu-devel@nongnu.org, Stefan Hajnoczi <stefanha@redhat.com>
Subject: Re: [PATCH 16/20] trace: include qemu_loglevel_mask(LOG_TRACE) in guard
Date: Fri, 2 Oct 2026 12:03:55 +0100 [thread overview]
Message-ID: <ar-Pm3jf4q4gyj0W@redhat.com> (raw)
In-Reply-To: <75ae2444-0ac9-4aee-8881-fb3431c639e8@redhat.com>
On Fri, Oct 02, 2026 at 12:45:49PM +0200, Paolo Bonzini wrote:
> On 10/1/26 17:12, Daniel P. Berrangé wrote:
> > If emitting a trace event requires computation for the parameters
> > passed to the probe, the callers should guard that computation
> > with trace_event_by_state_backends(), which is a macro expanding
> > to the a check of the "TRACE_...._DSTATE()" expression. For the
> > log backend this should include a check for LOG_TRACE being
> > present in the configured log level.
> This also needs something for Rust (apologies for the mailer damage):
Ok, I'll test that and include it in a future v3, since I already
sent out v2 before seeing this.
> --- a/scripts/tracetool/backend/log.py
> +++ b/scripts/tracetool/backend/log.py
> @@ -16,7 +16,6 @@
>
>
> PUBLIC = True
> -CHECK_TRACE_EVENT_GET_STATE = True
>
>
> def generate_h_begin(events, group):
> @@ -52,3 +51,9 @@ def generate_rs(event, group):
> ' }',
> fmt=expand_format_string(event.fmt, event.name + " "),
> args=event.args.rust_call_varargs())
> +
> +def generate_rs_backend_dstate(event, group):
> + out(' unsafe { (bindings::qemu_loglevel & bindings::LOG_TRACE) != 0
> && '
> + + 'trace_event_state_is_enabled(_%(event_id)s_DSTATE) } ||',
> + event_id = 'TRACE_' + e.name.upper())
> +
>
> Paolo
>
With regards,
Daniel
--
|: https://berrange.com ~~ https://hachyderm.io/@berrange :|
|: https://libvirt.org ~~ https://entangle-photo.org :|
|: https://pixelfed.art/berrange ~~ https://fstop138.berrange.com :|
next prev parent reply other threads:[~2026-10-02 11:04 UTC|newest]
Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-01 15:12 [PATCH 00/20] trace: bugfixes, cleanups and optimizations Daniel P. Berrangé
2026-10-01 15:12 ` [PATCH 01/20] osdep: add 'ignore_value(x)' macro Daniel P. Berrangé
2026-10-01 15:12 ` [PATCH 02/20] trace: use 'ignore_value()' instead of a dummy variable Daniel P. Berrangé
2026-10-01 15:12 ` [PATCH 03/20] trace: fix handling of char** in UST backend Daniel P. Berrangé
2026-10-01 15:12 ` [PATCH 04/20] hw/xen: replace "long unsigned int" with "unsigned long " for dtrace Daniel P. Berrangé
2026-10-01 17:56 ` Philippe Mathieu-Daudé
2026-10-01 15:12 ` [PATCH 05/20] trace: block use of "long int" " Daniel P. Berrangé
2026-10-01 15:12 ` [PATCH 06/20] trace: drop unused trace_event_set_state_dynamic_init() Daniel P. Berrangé
2026-10-01 15:12 ` [PATCH 07/20] trace: remove obsolete references to vcpu property Daniel P. Berrangé
2026-10-01 17:58 ` Philippe Mathieu-Daudé
2026-10-01 15:12 ` [PATCH 08/20] trace: drop 'id' from TraceEvent struct when not required Daniel P. Berrangé
2026-10-01 15:12 ` [PATCH 09/20] trace: change "DSTATE" variables from uint16_t to uint8_t Daniel P. Berrangé
2026-10-01 15:12 ` [PATCH 10/20] trace: add testing of 'nop' trace backend Daniel P. Berrangé
2026-10-01 15:12 ` [PATCH 11/20] trace: don't emit TraceEvent structs when 'nop' backend is used Daniel P. Berrangé
2026-10-01 15:12 ` [PATCH 12/20] trace: add test of generation with all backends enabled Daniel P. Berrangé
2026-10-01 15:12 ` [PATCH 13/20] trace: remove redundant headers from simple trace backend code Daniel P. Berrangé
2026-10-01 15:12 ` [PATCH 14/20] audio: remove mistaken use of trace_event_get_state() Daniel P. Berrangé
2026-10-01 18:00 ` Philippe Mathieu-Daudé
2026-10-01 19:14 ` marcandre.lureau
2026-10-02 7:12 ` Daniel P. Berrangé
2026-10-01 15:12 ` [PATCH 15/20] hw/ppc: " Daniel P. Berrangé
2026-10-01 18:01 ` Philippe Mathieu-Daudé
2026-10-01 15:12 ` [PATCH 16/20] trace: include qemu_loglevel_mask(LOG_TRACE) in guard Daniel P. Berrangé
2026-10-02 10:45 ` Paolo Bonzini
2026-10-02 11:03 ` Daniel P. Berrangé [this message]
2026-10-02 14:49 ` Paolo Bonzini
2026-10-05 12:08 ` Daniel P. Berrangé
2026-10-01 15:12 ` [PATCH 17/20] trace: remove "disable" property from trace files Daniel P. Berrangé
2026-10-01 15:12 ` [PATCH 18/20] trace: stop tracking static disabled state Daniel P. Berrangé
2026-10-01 19:14 ` marcandre.lureau
2026-10-02 9:22 ` Daniel P. Berrangé
2026-10-01 15:12 ` [PATCH 19/20] trace: remove parsing of "disable" event property Daniel P. Berrangé
2026-10-01 15:12 ` [PATCH 20/20] trace: remove 'trace_event_get_state' wrapper Daniel P. Berrangé
2026-10-01 19:14 ` [PATCH 00/20] trace: bugfixes, cleanups and optimizations marcandre.lureau
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=ar-Pm3jf4q4gyj0W@redhat.com \
--to=berrange@redhat.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=stefanha@redhat.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 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.