[PULL 00/25] Tracing patches

Stefan Hajnoczi posted 25 patches 2 days, 12 hours ago
There is a newer version of this series
docs/devel/tracing.rst                       |  27 +----
qapi/trace.json                              |   5 +-
include/qemu/osdep.h                         |   8 ++
tests/tracetool/all.h                        | 100 +++++++++++++++++++
tests/tracetool/dtrace.h                     |   6 +-
tests/tracetool/ftrace.h                     |  14 ++-
tests/tracetool/log.h                        |  26 +++--
tests/tracetool/nop.h                        |  25 +++++
tests/tracetool/simple.h                     |  10 +-
tests/tracetool/syslog.h                     |  14 ++-
tests/tracetool/ust.h                        |   6 +-
trace/control-internal.h                     |   8 +-
trace/control.h                              |  49 +--------
trace/event-internal.h                       |  19 +---
audio/audio-mixeng-be.c                      |   2 +-
hw/ppc/vof.c                                 |  13 +--
monitor/qmp.c                                |   4 +-
stubs/trace-control.c                        |   6 --
tests/tracetool/all.c                        |  61 +++++++++++
tests/tracetool/dtrace.c                     |  10 +-
tests/tracetool/ftrace.c                     |  10 +-
tests/tracetool/log.c                        |  10 +-
tests/tracetool/nop.c                        |   7 ++
tests/tracetool/simple.c                     |  12 +--
tests/tracetool/syslog.c                     |  10 +-
tests/tracetool/ust.c                        |  10 +-
trace/control-target.c                       |  29 ------
trace/control.c                              |  19 +---
trace/ftrace.c                               |   3 +-
trace/qmp.c                                  |  47 +++------
trace/simple.c                               |   9 +-
hw/display/trace-events                      |   2 +-
hw/xen/trace-events                          |   4 +-
scripts/tracetool/__init__.py                |  32 ++----
scripts/tracetool/backend/__init__.py        |   7 +-
scripts/tracetool/backend/dtrace.py          |   2 -
scripts/tracetool/backend/ftrace.py          |   8 +-
scripts/tracetool/backend/log.py             |  22 ++--
scripts/tracetool/backend/simple.py          |   9 +-
scripts/tracetool/backend/syslog.py          |   6 +-
scripts/tracetool/format/c.py                |  68 ++++++-------
scripts/tracetool/format/d.py                |   3 -
scripts/tracetool/format/h.py                |  48 ++++-----
scripts/tracetool/format/log_stap.py         |   3 -
scripts/tracetool/format/rs.py               |  30 +++---
scripts/tracetool/format/simpletrace_stap.py |   3 -
scripts/tracetool/format/stap.py             |   3 -
scripts/tracetool/format/ust_events_c.py     |   3 -
scripts/tracetool/format/ust_events_h.py     |   7 +-
target/hppa/trace-events                     |  28 +++---
tests/tracetool/all.d                        |  10 ++
tests/tracetool/all.log-stap                 |  15 +++
tests/tracetool/all.rs                       |  98 ++++++++++++++++++
tests/tracetool/all.simpletrace-stap         |  16 +++
tests/tracetool/all.stap                     |  14 +++
tests/tracetool/all.ust-events-c             |  14 +++
tests/tracetool/all.ust-events-h             |  56 +++++++++++
tests/tracetool/dtrace.rs                    |   6 +-
tests/tracetool/ftrace.rs                    |  10 +-
tests/tracetool/log.rs                       |  12 ++-
tests/tracetool/meson.build                  |   4 +-
tests/tracetool/nop.rs                       |  51 ++++++++++
tests/tracetool/simple.rs                    |   6 +-
tests/tracetool/syslog.rs                    |  10 +-
tests/tracetool/tracetool-test.py            |  12 ++-
65 files changed, 747 insertions(+), 454 deletions(-)
create mode 100644 tests/tracetool/all.h
create mode 100644 tests/tracetool/nop.h
create mode 100644 tests/tracetool/all.c
create mode 100644 tests/tracetool/nop.c
create mode 100644 tests/tracetool/all.d
create mode 100644 tests/tracetool/all.log-stap
create mode 100644 tests/tracetool/all.rs
create mode 100644 tests/tracetool/all.simpletrace-stap
create mode 100644 tests/tracetool/all.stap
create mode 100644 tests/tracetool/all.ust-events-c
create mode 100644 tests/tracetool/all.ust-events-h
create mode 100644 tests/tracetool/nop.rs
[PULL 00/25] Tracing patches
Posted by Stefan Hajnoczi 2 days, 12 hours ago
The following changes since commit 56afd82bd4db9688f1c1c9d0e2ea163b8cde3283:

  Merge tag 'qemu-sparc-20261101' of https://github.com/mcayland/qemu into staging (2026-11-01 08:37:48 -0800)

are available in the Git repository at:

  https://gitlab.com/stefanha/qemu.git tags/tracing-pull-request

for you to fetch changes up to 3b68720390b98f21e26ffcff8874851b7b49b7b7:

  trace: remove 'trace_event_get_state' wrapper (2026-11-02 13:52:14 -0500)

----------------------------------------------------------------
Pull request

Daniel Berrangé's 'disable' property removal and associated cleanups.

----------------------------------------------------------------

Daniel P. Berrangé (25):
  osdep: add 'ignore_value(x)' macro
  trace: use 'ignore_value()' instead of a dummy variable
  trace: fix handling of char** in UST backend
  hw/xen: replace "long unsigned int" with "unsigned long " for dtrace
  trace: block use of "long int" for dtrace
  trace: drop unused trace_event_set_state_dynamic_init()
  trace: remove obsolete references to vcpu property
  trace: drop 'id' from TraceEvent struct when not required
  trace: change "DSTATE" variables from uint16_t to uint8_t
  trace: add testing of 'nop' trace backend
  trace: don't emit TraceEvent structs when 'nop' backend is used
  trace: add test of generation with all backends enabled
  trace: remove redundant headers from simple trace backend code
  trace: include probe name in Rust format strings
  trace: add missing newline in ftrace Rust format string
  trace: eliminate dupe trace_event_get_state_dynamic_by_id() calls
  audio: remove mistaken use of trace_event_get_state()
  hw/ppc: remove mistaken use of trace_event_get_state()
  monitor: remove mistaken use of trace_event_get_state()
  trace: include qemu_loglevel_mask(LOG_TRACE) in guard
  target/hppa: use PRIx64 in trace-events
  trace: remove "disable" property from trace files
  trace: stop tracking static disabled state
  trace: remove parsing of "disable" event property
  trace: remove 'trace_event_get_state' wrapper

 docs/devel/tracing.rst                       |  27 +----
 qapi/trace.json                              |   5 +-
 include/qemu/osdep.h                         |   8 ++
 tests/tracetool/all.h                        | 100 +++++++++++++++++++
 tests/tracetool/dtrace.h                     |   6 +-
 tests/tracetool/ftrace.h                     |  14 ++-
 tests/tracetool/log.h                        |  26 +++--
 tests/tracetool/nop.h                        |  25 +++++
 tests/tracetool/simple.h                     |  10 +-
 tests/tracetool/syslog.h                     |  14 ++-
 tests/tracetool/ust.h                        |   6 +-
 trace/control-internal.h                     |   8 +-
 trace/control.h                              |  49 +--------
 trace/event-internal.h                       |  19 +---
 audio/audio-mixeng-be.c                      |   2 +-
 hw/ppc/vof.c                                 |  13 +--
 monitor/qmp.c                                |   4 +-
 stubs/trace-control.c                        |   6 --
 tests/tracetool/all.c                        |  61 +++++++++++
 tests/tracetool/dtrace.c                     |  10 +-
 tests/tracetool/ftrace.c                     |  10 +-
 tests/tracetool/log.c                        |  10 +-
 tests/tracetool/nop.c                        |   7 ++
 tests/tracetool/simple.c                     |  12 +--
 tests/tracetool/syslog.c                     |  10 +-
 tests/tracetool/ust.c                        |  10 +-
 trace/control-target.c                       |  29 ------
 trace/control.c                              |  19 +---
 trace/ftrace.c                               |   3 +-
 trace/qmp.c                                  |  47 +++------
 trace/simple.c                               |   9 +-
 hw/display/trace-events                      |   2 +-
 hw/xen/trace-events                          |   4 +-
 scripts/tracetool/__init__.py                |  32 ++----
 scripts/tracetool/backend/__init__.py        |   7 +-
 scripts/tracetool/backend/dtrace.py          |   2 -
 scripts/tracetool/backend/ftrace.py          |   8 +-
 scripts/tracetool/backend/log.py             |  22 ++--
 scripts/tracetool/backend/simple.py          |   9 +-
 scripts/tracetool/backend/syslog.py          |   6 +-
 scripts/tracetool/format/c.py                |  68 ++++++-------
 scripts/tracetool/format/d.py                |   3 -
 scripts/tracetool/format/h.py                |  48 ++++-----
 scripts/tracetool/format/log_stap.py         |   3 -
 scripts/tracetool/format/rs.py               |  30 +++---
 scripts/tracetool/format/simpletrace_stap.py |   3 -
 scripts/tracetool/format/stap.py             |   3 -
 scripts/tracetool/format/ust_events_c.py     |   3 -
 scripts/tracetool/format/ust_events_h.py     |   7 +-
 target/hppa/trace-events                     |  28 +++---
 tests/tracetool/all.d                        |  10 ++
 tests/tracetool/all.log-stap                 |  15 +++
 tests/tracetool/all.rs                       |  98 ++++++++++++++++++
 tests/tracetool/all.simpletrace-stap         |  16 +++
 tests/tracetool/all.stap                     |  14 +++
 tests/tracetool/all.ust-events-c             |  14 +++
 tests/tracetool/all.ust-events-h             |  56 +++++++++++
 tests/tracetool/dtrace.rs                    |   6 +-
 tests/tracetool/ftrace.rs                    |  10 +-
 tests/tracetool/log.rs                       |  12 ++-
 tests/tracetool/meson.build                  |   4 +-
 tests/tracetool/nop.rs                       |  51 ++++++++++
 tests/tracetool/simple.rs                    |   6 +-
 tests/tracetool/syslog.rs                    |  10 +-
 tests/tracetool/tracetool-test.py            |  12 ++-
 65 files changed, 747 insertions(+), 454 deletions(-)
 create mode 100644 tests/tracetool/all.h
 create mode 100644 tests/tracetool/nop.h
 create mode 100644 tests/tracetool/all.c
 create mode 100644 tests/tracetool/nop.c
 create mode 100644 tests/tracetool/all.d
 create mode 100644 tests/tracetool/all.log-stap
 create mode 100644 tests/tracetool/all.rs
 create mode 100644 tests/tracetool/all.simpletrace-stap
 create mode 100644 tests/tracetool/all.stap
 create mode 100644 tests/tracetool/all.ust-events-c
 create mode 100644 tests/tracetool/all.ust-events-h
 create mode 100644 tests/tracetool/nop.rs

-- 
2.56.0


Re: [PULL 00/25] Tracing patches
Posted by Richard Henderson 1 day, 12 hours ago
On 11/2/26 10:58, Stefan Hajnoczi wrote:
> The following changes since commit 56afd82bd4db9688f1c1c9d0e2ea163b8cde3283:
> 
>    Merge tag 'qemu-sparc-20261101' ofhttps://github.com/mcayland/qemu into staging (2026-11-01 08:37:48 -0800)
> 
> are available in the Git repository at:
> 
>    https://gitlab.com/stefanha/qemu.git tags/tracing-pull-request
> 
> for you to fetch changes up to 3b68720390b98f21e26ffcff8874851b7b49b7b7:
> 
>    trace: remove 'trace_event_get_state' wrapper (2026-11-02 13:52:14 -0500)
> 
> ----------------------------------------------------------------
> Pull request
> 
> Daniel Berrangé's 'disable' property removal and associated cleanups.

Function signature change in here somewhere that didn't get propagated 
to rust?

https://gitlab.com/qemu-project/qemu/-/jobs/17710633655#L4275

> error[E0308]: mismatched types
>    --> /builds/qemu-project/qemu/build/trace/trace-hw_char.rs:236:14
>     |
> 236 |       unsafe { (bindings::qemu_loglevel & bindings::LOG_TRACE) != 0 &&
>     |  ______________^
> 237 | |              trace_event_state_is_enabled(_TRACE_PARALLEL_IOPORT_READ_DSTATE) } ||
>     | |_____________________________________________________________________________^ expected `()`, found `bool`
>     |

etc.


r~

Re: [PULL 00/25] Tracing patches
Posted by Daniel P. Berrangé 20 hours ago
On Tue, Nov 03, 2026 at 10:59:43AM -0800, Richard Henderson wrote:
> On 11/2/26 10:58, Stefan Hajnoczi wrote:
> > The following changes since commit 56afd82bd4db9688f1c1c9d0e2ea163b8cde3283:
> > 
> >    Merge tag 'qemu-sparc-20261101' ofhttps://github.com/mcayland/qemu into staging (2026-11-01 08:37:48 -0800)
> > 
> > are available in the Git repository at:
> > 
> >    https://gitlab.com/stefanha/qemu.git tags/tracing-pull-request
> > 
> > for you to fetch changes up to 3b68720390b98f21e26ffcff8874851b7b49b7b7:
> > 
> >    trace: remove 'trace_event_get_state' wrapper (2026-11-02 13:52:14 -0500)
> > 
> > ----------------------------------------------------------------
> > Pull request
> > 
> > Daniel Berrangé's 'disable' property removal and associated cleanups.
> 
> Function signature change in here somewhere that didn't get propagated to
> rust?
> 
> https://gitlab.com/qemu-project/qemu/-/jobs/17710633655#L4275
> 
> > error[E0308]: mismatched types
> >    --> /builds/qemu-project/qemu/build/trace/trace-hw_char.rs:236:14
> >     |
> > 236 |       unsafe { (bindings::qemu_loglevel & bindings::LOG_TRACE) != 0 &&
> >     |  ______________^
> > 237 | |              trace_event_state_is_enabled(_TRACE_PARALLEL_IOPORT_READ_DSTATE) } ||
> >     | |_____________________________________________________________________________^ expected `()`, found `bool`
> >     |
> 
> etc.

Bug in the "trace: include qemu_loglevel_mask(LOG_TRACE) in guard" patch

Guess I must have not had --enable-rust set after I changed that code.

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 :|