qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2] tracing: deprecate "ust" tracing backend
@ 2025-09-23  7:44 Paolo Bonzini
  2025-09-23  8:43 ` Daniel P. Berrangé
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Paolo Bonzini @ 2025-09-23  7:44 UTC (permalink / raw)
  To: qemu-devel; +Cc: berrange, stefanha, mads

The "ust" backend is complex (tracetool contains two output formats just
for that backend).  It is not clear if if it has any users, and LTTng
anyway can use the uprobe tracepoints provided by the "dtrace" backend,
therefore deprecate "ust".

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 docs/about/deprecated.rst | 9 +++++++++
 meson.build               | 4 ++++
 2 files changed, 13 insertions(+)

diff --git a/docs/about/deprecated.rst b/docs/about/deprecated.rst
index aa300bbd507..57250f9d47f 100644
--- a/docs/about/deprecated.rst
+++ b/docs/about/deprecated.rst
@@ -533,3 +533,12 @@ command documentation for details on the ``fdset`` usage.
 
 The ``zero-blocks`` capability was part of the block migration which
 doesn't exist anymore since it was removed in QEMU v9.1.
+
+Host features
+-------------
+
+``ust`` tracing backend
+-----------------------
+
+LTTng can use uprobe tracepoints, therefore it is recommended to use
+the ``dtrace`` backend instead.
diff --git a/meson.build b/meson.build
index 72da97829ab..b5e2186b35e 100644
--- a/meson.build
+++ b/meson.build
@@ -5073,3 +5073,7 @@ if not actually_reloc and (host_os == 'windows' or get_option('relocatable'))
   message('QEMU will have to be installed under ' + get_option('prefix') + '.')
   message('Use --disable-relocatable to remove this warning.')
 endif
+
+if 'ust' in get_option('trace_backends')
+  warning('ust trace backend is deprecated, use dtrace backend for uprobe support')
+endif
-- 
2.51.0



^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH v2] tracing: deprecate "ust" tracing backend
  2025-09-23  7:44 [PATCH v2] tracing: deprecate "ust" tracing backend Paolo Bonzini
@ 2025-09-23  8:43 ` Daniel P. Berrangé
  2025-09-23 11:25 ` Alex Bennée
  2025-09-23 18:47 ` Stefan Hajnoczi
  2 siblings, 0 replies; 4+ messages in thread
From: Daniel P. Berrangé @ 2025-09-23  8:43 UTC (permalink / raw)
  To: Paolo Bonzini; +Cc: qemu-devel, stefanha, mads

On Tue, Sep 23, 2025 at 09:44:18AM +0200, Paolo Bonzini wrote:
> The "ust" backend is complex (tracetool contains two output formats just
> for that backend).  It is not clear if if it has any users, and LTTng
> anyway can use the uprobe tracepoints provided by the "dtrace" backend,
> therefore deprecate "ust".
> 
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> ---
>  docs/about/deprecated.rst | 9 +++++++++
>  meson.build               | 4 ++++
>  2 files changed, 13 insertions(+)

Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>


With regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH v2] tracing: deprecate "ust" tracing backend
  2025-09-23  7:44 [PATCH v2] tracing: deprecate "ust" tracing backend Paolo Bonzini
  2025-09-23  8:43 ` Daniel P. Berrangé
@ 2025-09-23 11:25 ` Alex Bennée
  2025-09-23 18:47 ` Stefan Hajnoczi
  2 siblings, 0 replies; 4+ messages in thread
From: Alex Bennée @ 2025-09-23 11:25 UTC (permalink / raw)
  To: Paolo Bonzini; +Cc: qemu-devel, berrange, stefanha, mads

Paolo Bonzini <pbonzini@redhat.com> writes:

> The "ust" backend is complex (tracetool contains two output formats just
> for that backend).  It is not clear if if it has any users, and LTTng
> anyway can use the uprobe tracepoints provided by the "dtrace" backend,
> therefore deprecate "ust".
>
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>

Reviewed-by: Alex Bennée <alex.bennee@linaro.org>

-- 
Alex Bennée
Virtualisation Tech Lead @ Linaro


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH v2] tracing: deprecate "ust" tracing backend
  2025-09-23  7:44 [PATCH v2] tracing: deprecate "ust" tracing backend Paolo Bonzini
  2025-09-23  8:43 ` Daniel P. Berrangé
  2025-09-23 11:25 ` Alex Bennée
@ 2025-09-23 18:47 ` Stefan Hajnoczi
  2 siblings, 0 replies; 4+ messages in thread
From: Stefan Hajnoczi @ 2025-09-23 18:47 UTC (permalink / raw)
  To: Paolo Bonzini; +Cc: qemu-devel, berrange, mads

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

On Tue, Sep 23, 2025 at 09:44:18AM +0200, Paolo Bonzini wrote:
> The "ust" backend is complex (tracetool contains two output formats just
> for that backend).  It is not clear if if it has any users, and LTTng
> anyway can use the uprobe tracepoints provided by the "dtrace" backend,
> therefore deprecate "ust".

LTTng UST cannot trace all of QEMU's SDT probes because QEMU uses SDT
semaphores. Semaphores appear to be unsupported by LTTng:
https://bugs.lttng.org/issues/1180

Here is an example that won't work:

  static MemTxResult  memory_region_read_accessor(MemoryRegion *mr,
                                                  hwaddr addr,
                                                  uint64_t *value,
                                                  unsigned size,
                                                  signed shift,
                                                  uint64_t mask,
                                                  MemTxAttrs attrs)
  {
      uint64_t tmp;
  
      tmp = mr->ops->read(mr->opaque, addr, size);
      if (mr->subpage) {
          trace_memory_region_subpage_read(get_cpu_index(), mr, addr, tmp, size);
      } else if (trace_event_get_state_backends(TRACE_MEMORY_REGION_OPS_READ)) {
                 ^^^ semaphore ^^^
          hwaddr abs_addr = memory_region_to_absolute_addr(mr, addr);
          trace_memory_region_ops_read(get_cpu_index(), mr, abs_addr, tmp, size,
                                       memory_region_name(mr));
      }

However, I don't remember hearing from LTTng UST users all these years,
so I think it's okay to deprecate this tracing backend.

Please update the commit description to mention that trace events that
use SDT semaphores do not work with LTTng UST.

Thanks,
Stefan

> 
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> ---
>  docs/about/deprecated.rst | 9 +++++++++
>  meson.build               | 4 ++++
>  2 files changed, 13 insertions(+)
> 
> diff --git a/docs/about/deprecated.rst b/docs/about/deprecated.rst
> index aa300bbd507..57250f9d47f 100644
> --- a/docs/about/deprecated.rst
> +++ b/docs/about/deprecated.rst
> @@ -533,3 +533,12 @@ command documentation for details on the ``fdset`` usage.
>  
>  The ``zero-blocks`` capability was part of the block migration which
>  doesn't exist anymore since it was removed in QEMU v9.1.
> +
> +Host features
> +-------------
> +
> +``ust`` tracing backend
> +-----------------------
> +
> +LTTng can use uprobe tracepoints, therefore it is recommended to use
> +the ``dtrace`` backend instead.
> diff --git a/meson.build b/meson.build
> index 72da97829ab..b5e2186b35e 100644
> --- a/meson.build
> +++ b/meson.build
> @@ -5073,3 +5073,7 @@ if not actually_reloc and (host_os == 'windows' or get_option('relocatable'))
>    message('QEMU will have to be installed under ' + get_option('prefix') + '.')
>    message('Use --disable-relocatable to remove this warning.')
>  endif
> +
> +if 'ust' in get_option('trace_backends')
> +  warning('ust trace backend is deprecated, use dtrace backend for uprobe support')
> +endif
> -- 
> 2.51.0
> 

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2025-09-23 18:48 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-09-23  7:44 [PATCH v2] tracing: deprecate "ust" tracing backend Paolo Bonzini
2025-09-23  8:43 ` Daniel P. Berrangé
2025-09-23 11:25 ` Alex Bennée
2025-09-23 18:47 ` Stefan Hajnoczi

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).