qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PULL for-5.1 0/2] Tracing patches
@ 2020-07-30 18:14 Stefan Hajnoczi
  2020-07-30 18:14 ` [PULL for-5.1 1/2] trace/simple: Allow enabling simple traces from command line Stefan Hajnoczi
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Stefan Hajnoczi @ 2020-07-30 18:14 UTC (permalink / raw)
  To: qemu-devel
  Cc: Peter Maydell, Eduardo Habkost, Gerd Hoffmann, Stefan Hajnoczi,
	Cleber Rosa, Paolo Bonzini

The following changes since commit 5772f2b1fc5d00e7e04e01fa28e9081d6550440a:

  Update version for v5.1.0-rc2 release (2020-07-28 21:51:03 +0100)

are available in the Git repository at:

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

for you to fetch changes up to 000822441e34916991f7c03217dc24f38be49e50:

  tracetool: carefully define SDT_USE_VARIADIC (2020-07-30 16:02:38 +0100)

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

A build fix and a 'simple' trace backend regression fix.

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

Josh DuBois (1):
  trace/simple: Allow enabling simple traces from command line

Stefan Hajnoczi (1):
  tracetool: carefully define SDT_USE_VARIADIC

 trace/control.c                     | 1 +
 scripts/tracetool/backend/dtrace.py | 4 ++++
 2 files changed, 5 insertions(+)

-- 
2.26.2


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

* [PULL for-5.1 1/2] trace/simple: Allow enabling simple traces from command line
  2020-07-30 18:14 [PULL for-5.1 0/2] Tracing patches Stefan Hajnoczi
@ 2020-07-30 18:14 ` Stefan Hajnoczi
  2020-07-30 18:14 ` [PULL for-5.1 2/2] tracetool: carefully define SDT_USE_VARIADIC Stefan Hajnoczi
  2020-07-30 20:25 ` [PULL for-5.1 0/2] Tracing patches Peter Maydell
  2 siblings, 0 replies; 4+ messages in thread
From: Stefan Hajnoczi @ 2020-07-30 18:14 UTC (permalink / raw)
  To: qemu-devel
  Cc: Peter Maydell, Josh DuBois, Eduardo Habkost, Josh DuBois,
	Gerd Hoffmann, Stefan Hajnoczi, Cleber Rosa, Paolo Bonzini

From: Josh DuBois <duboisj@gmail.com>

The simple trace backend is enabled / disabled with a call
to st_set_trace_file_enabled().  When initializing tracing
from the command-line, this must be enabled on startup.
(Prior to db25d56c014aa1a9, command-line initialization of
simple trace worked because every call to st_set_trace_file
enabled tracing.)

Fixes: db25d56c014aa1a96319c663e0a60346a223b31e
Signed-off-by: Josh DuBois <josh@joshdubois.com>
Message-id: 20200723053359.256928-1-josh@joshdubois.com
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
---
 trace/control.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/trace/control.c b/trace/control.c
index 2ffe000818..6558b5c906 100644
--- a/trace/control.c
+++ b/trace/control.c
@@ -225,6 +225,7 @@ void trace_init_file(const char *file)
 {
 #ifdef CONFIG_TRACE_SIMPLE
     st_set_trace_file(file);
+    st_set_trace_file_enabled(true);
 #elif defined CONFIG_TRACE_LOG
     /*
      * If both the simple and the log backends are enabled, "--trace file"
-- 
2.26.2


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

* [PULL for-5.1 2/2] tracetool: carefully define SDT_USE_VARIADIC
  2020-07-30 18:14 [PULL for-5.1 0/2] Tracing patches Stefan Hajnoczi
  2020-07-30 18:14 ` [PULL for-5.1 1/2] trace/simple: Allow enabling simple traces from command line Stefan Hajnoczi
@ 2020-07-30 18:14 ` Stefan Hajnoczi
  2020-07-30 20:25 ` [PULL for-5.1 0/2] Tracing patches Peter Maydell
  2 siblings, 0 replies; 4+ messages in thread
From: Stefan Hajnoczi @ 2020-07-30 18:14 UTC (permalink / raw)
  To: qemu-devel
  Cc: Peter Maydell, Eduardo Habkost, Gerd Hoffmann, Stefan Hajnoczi,
	Cleber Rosa, Paolo Bonzini

The dtrace backend defines SDT_USE_VARIADIC as a workaround for a
conflict with a LTTng UST header file, which requires SDT_USE_VARIADIC
to be defined.

LTTng UST <lttng/tracepoint.h> breaks if included after generated dtrace
headers because SDT_USE_VARIADIC will already be defined:

  #ifdef LTTNG_UST_HAVE_SDT_INTEGRATION
  #define SDT_USE_VARIADIC <-- error, it's already defined
  #include <sys/sdt.h>

Be more careful when defining SDT_USE_VARIADIC. This fixes the build
when both the dtrace and ust tracers are enabled at the same time.

Fixes: 27e08bab94f7c6ebe0b75938c98c394c969e3fd8 ("tracetool: work around ust <sys/sdt.h> include conflict")
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Message-id: 20200729153926.127083-1-stefanha@redhat.com
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
---
 scripts/tracetool/backend/dtrace.py | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/scripts/tracetool/backend/dtrace.py b/scripts/tracetool/backend/dtrace.py
index b7fe4c1b50..fc0c8fc52f 100644
--- a/scripts/tracetool/backend/dtrace.py
+++ b/scripts/tracetool/backend/dtrace.py
@@ -44,11 +44,15 @@ def generate_h_begin(events, group):
     # require SDT_USE_VARIADIC to be defined. If dtrace includes <sys/sdt.h>
     # first without defining SDT_USE_VARIADIC then ust breaks because the
     # STAP_PROBEV() macro is not defined.
+    out('#ifndef SDT_USE_VARIADIC')
     out('#define SDT_USE_VARIADIC 1')
+    out('#endif')
 
     out('#include "%s"' % header,
         '')
 
+    out('#undef SDT_USE_VARIADIC')
+
     # SystemTap defines <provider>_<name>_ENABLED() but other DTrace
     # implementations might not.
     for e in events:
-- 
2.26.2


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

* Re: [PULL for-5.1 0/2] Tracing patches
  2020-07-30 18:14 [PULL for-5.1 0/2] Tracing patches Stefan Hajnoczi
  2020-07-30 18:14 ` [PULL for-5.1 1/2] trace/simple: Allow enabling simple traces from command line Stefan Hajnoczi
  2020-07-30 18:14 ` [PULL for-5.1 2/2] tracetool: carefully define SDT_USE_VARIADIC Stefan Hajnoczi
@ 2020-07-30 20:25 ` Peter Maydell
  2 siblings, 0 replies; 4+ messages in thread
From: Peter Maydell @ 2020-07-30 20:25 UTC (permalink / raw)
  To: Stefan Hajnoczi
  Cc: Paolo Bonzini, Gerd Hoffmann, QEMU Developers, Eduardo Habkost,
	Cleber Rosa

On Thu, 30 Jul 2020 at 19:14, Stefan Hajnoczi <stefanha@redhat.com> wrote:
>
> The following changes since commit 5772f2b1fc5d00e7e04e01fa28e9081d6550440a:
>
>   Update version for v5.1.0-rc2 release (2020-07-28 21:51:03 +0100)
>
> are available in the Git repository at:
>
>   https://github.com/stefanha/qemu.git tags/tracing-pull-request
>
> for you to fetch changes up to 000822441e34916991f7c03217dc24f38be49e50:
>
>   tracetool: carefully define SDT_USE_VARIADIC (2020-07-30 16:02:38 +0100)
>
> ----------------------------------------------------------------
> Pull request
>
> A build fix and a 'simple' trace backend regression fix.
>
> ----------------------------------------------------------------


Applied, thanks.

Please update the changelog at https://wiki.qemu.org/ChangeLog/5.1
for any user-visible changes.

-- PMM


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

end of thread, other threads:[~2020-07-30 20:26 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-30 18:14 [PULL for-5.1 0/2] Tracing patches Stefan Hajnoczi
2020-07-30 18:14 ` [PULL for-5.1 1/2] trace/simple: Allow enabling simple traces from command line Stefan Hajnoczi
2020-07-30 18:14 ` [PULL for-5.1 2/2] tracetool: carefully define SDT_USE_VARIADIC Stefan Hajnoczi
2020-07-30 20:25 ` [PULL for-5.1 0/2] Tracing patches Peter Maydell

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