qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PULL 0/2] Tracing patches
@ 2020-06-24 10:49 Stefan Hajnoczi
  2020-06-24 10:49 ` [PULL 1/2] scripts/tracetool: Update maintainer email address Stefan Hajnoczi
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Stefan Hajnoczi @ 2020-06-24 10:49 UTC (permalink / raw)
  To: qemu-devel
  Cc: Peter Maydell, Eduardo Habkost, Gerd Hoffmann, Stefan Hajnoczi,
	Cleber Rosa, Paolo Bonzini

The following changes since commit d88d5a3806d78dcfca648c62dae9d88d3e803bd2:

  Merge remote-tracking branch 'remotes/philmd-gitlab/tags/renesas-hw-2020062=
2' into staging (2020-06-23 13:55:52 +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 db25d56c014aa1a96319c663e0a60346a223b31e:

  trace/simple: Fix unauthorized enable (2020-06-24 11:21:00 +0100)

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

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

Markus Armbruster (1):
  trace/simple: Fix unauthorized enable

Philippe Mathieu-Daud=C3=A9 (1):
  scripts/tracetool: Update maintainer email address

 trace/simple.h                                |  2 +-
 trace/simple.c                                | 20 +++++++++++++------
 scripts/tracetool.py                          |  2 +-
 scripts/tracetool/__init__.py                 |  2 +-
 scripts/tracetool/backend/__init__.py         |  2 +-
 scripts/tracetool/backend/dtrace.py           |  2 +-
 scripts/tracetool/backend/log.py              |  2 +-
 scripts/tracetool/backend/simple.py           |  2 +-
 scripts/tracetool/backend/ust.py              |  2 +-
 scripts/tracetool/format/__init__.py          |  2 +-
 scripts/tracetool/format/c.py                 |  2 +-
 scripts/tracetool/format/d.py                 |  2 +-
 scripts/tracetool/format/h.py                 |  2 +-
 scripts/tracetool/format/stap.py              |  2 +-
 scripts/tracetool/format/tcg_h.py             |  2 +-
 scripts/tracetool/format/tcg_helper_c.py      |  2 +-
 scripts/tracetool/format/tcg_helper_h.py      |  2 +-
 .../tracetool/format/tcg_helper_wrapper_h.py  |  2 +-
 scripts/tracetool/transform.py                |  2 +-
 scripts/tracetool/vcpu.py                     |  2 +-
 20 files changed, 33 insertions(+), 25 deletions(-)

--=20
2.26.2


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

* [PULL 1/2] scripts/tracetool: Update maintainer email address
  2020-06-24 10:49 [PULL 0/2] Tracing patches Stefan Hajnoczi
@ 2020-06-24 10:49 ` Stefan Hajnoczi
  2020-06-24 10:49 ` [PULL 2/2] trace/simple: Fix unauthorized enable Stefan Hajnoczi
  2020-06-25 14:27 ` [PULL 0/2] Tracing patches Peter Maydell
  2 siblings, 0 replies; 4+ messages in thread
From: Stefan Hajnoczi @ 2020-06-24 10:49 UTC (permalink / raw)
  To: qemu-devel
  Cc: Peter Maydell, Eduardo Habkost, John Snow, Gerd Hoffmann,
	Stefan Hajnoczi, Cleber Rosa, Paolo Bonzini,
	Philippe Mathieu-Daudé

From: Philippe Mathieu-Daudé <philmd@redhat.com>

There is an effort in progress to generate a QEMU Python
package. As I'm not sure this old email is still valid,
update it to not produce package with broken maintainer
email.

Patch created mechanically by running:

 $ sed -i 's,\(__email__ *= "\)stefanha@linux.vnet.ibm.com",\1stefanha@redhat.com",' \
         $(git grep -l 'email.*stefanha@linux.vnet.ibm.com')

Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Reviewed-by: John Snow <jsnow@redhat.com>
Message-id: 20200511082816.696-1-philmd@redhat.com
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
---
 scripts/tracetool.py                             | 2 +-
 scripts/tracetool/__init__.py                    | 2 +-
 scripts/tracetool/backend/__init__.py            | 2 +-
 scripts/tracetool/backend/dtrace.py              | 2 +-
 scripts/tracetool/backend/log.py                 | 2 +-
 scripts/tracetool/backend/simple.py              | 2 +-
 scripts/tracetool/backend/ust.py                 | 2 +-
 scripts/tracetool/format/__init__.py             | 2 +-
 scripts/tracetool/format/c.py                    | 2 +-
 scripts/tracetool/format/d.py                    | 2 +-
 scripts/tracetool/format/h.py                    | 2 +-
 scripts/tracetool/format/stap.py                 | 2 +-
 scripts/tracetool/format/tcg_h.py                | 2 +-
 scripts/tracetool/format/tcg_helper_c.py         | 2 +-
 scripts/tracetool/format/tcg_helper_h.py         | 2 +-
 scripts/tracetool/format/tcg_helper_wrapper_h.py | 2 +-
 scripts/tracetool/transform.py                   | 2 +-
 scripts/tracetool/vcpu.py                        | 2 +-
 18 files changed, 18 insertions(+), 18 deletions(-)

diff --git a/scripts/tracetool.py b/scripts/tracetool.py
index 264cc9eecc..31146242b7 100755
--- a/scripts/tracetool.py
+++ b/scripts/tracetool.py
@@ -10,7 +10,7 @@ __copyright__  = "Copyright 2012-2014, Lluís Vilanova <vilanova@ac.upc.edu>"
 __license__    = "GPL version 2 or (at your option) any later version"
 
 __maintainer__ = "Stefan Hajnoczi"
-__email__      = "stefanha@linux.vnet.ibm.com"
+__email__      = "stefanha@redhat.com"
 
 
 import sys
diff --git a/scripts/tracetool/__init__.py b/scripts/tracetool/__init__.py
index 13d29f1e42..3ccfa1e116 100644
--- a/scripts/tracetool/__init__.py
+++ b/scripts/tracetool/__init__.py
@@ -9,7 +9,7 @@ __copyright__  = "Copyright 2012-2017, Lluís Vilanova <vilanova@ac.upc.edu>"
 __license__    = "GPL version 2 or (at your option) any later version"
 
 __maintainer__ = "Stefan Hajnoczi"
-__email__      = "stefanha@linux.vnet.ibm.com"
+__email__      = "stefanha@redhat.com"
 
 
 import re
diff --git a/scripts/tracetool/backend/__init__.py b/scripts/tracetool/backend/__init__.py
index 54cab2c4de..7bfcc86cc5 100644
--- a/scripts/tracetool/backend/__init__.py
+++ b/scripts/tracetool/backend/__init__.py
@@ -50,7 +50,7 @@ __copyright__  = "Copyright 2012-2014, Lluís Vilanova <vilanova@ac.upc.edu>"
 __license__    = "GPL version 2 or (at your option) any later version"
 
 __maintainer__ = "Stefan Hajnoczi"
-__email__      = "stefanha@linux.vnet.ibm.com"
+__email__      = "stefanha@redhat.com"
 
 
 import os
diff --git a/scripts/tracetool/backend/dtrace.py b/scripts/tracetool/backend/dtrace.py
index 638990db79..5711892ba0 100644
--- a/scripts/tracetool/backend/dtrace.py
+++ b/scripts/tracetool/backend/dtrace.py
@@ -9,7 +9,7 @@ __copyright__  = "Copyright 2012-2017, Lluís Vilanova <vilanova@ac.upc.edu>"
 __license__    = "GPL version 2 or (at your option) any later version"
 
 __maintainer__ = "Stefan Hajnoczi"
-__email__      = "stefanha@linux.vnet.ibm.com"
+__email__      = "stefanha@redhat.com"
 
 
 from tracetool import out
diff --git a/scripts/tracetool/backend/log.py b/scripts/tracetool/backend/log.py
index 23b274c0fd..877222bbe9 100644
--- a/scripts/tracetool/backend/log.py
+++ b/scripts/tracetool/backend/log.py
@@ -9,7 +9,7 @@ __copyright__  = "Copyright 2012-2017, Lluís Vilanova <vilanova@ac.upc.edu>"
 __license__    = "GPL version 2 or (at your option) any later version"
 
 __maintainer__ = "Stefan Hajnoczi"
-__email__      = "stefanha@linux.vnet.ibm.com"
+__email__      = "stefanha@redhat.com"
 
 
 from tracetool import out
diff --git a/scripts/tracetool/backend/simple.py b/scripts/tracetool/backend/simple.py
index b650c262b5..a74d61fcd6 100644
--- a/scripts/tracetool/backend/simple.py
+++ b/scripts/tracetool/backend/simple.py
@@ -9,7 +9,7 @@ __copyright__  = "Copyright 2012-2017, Lluís Vilanova <vilanova@ac.upc.edu>"
 __license__    = "GPL version 2 or (at your option) any later version"
 
 __maintainer__ = "Stefan Hajnoczi"
-__email__      = "stefanha@linux.vnet.ibm.com"
+__email__      = "stefanha@redhat.com"
 
 
 from tracetool import out
diff --git a/scripts/tracetool/backend/ust.py b/scripts/tracetool/backend/ust.py
index a772a3b53b..6c0a5f8d68 100644
--- a/scripts/tracetool/backend/ust.py
+++ b/scripts/tracetool/backend/ust.py
@@ -9,7 +9,7 @@ __copyright__  = "Copyright 2012-2017, Lluís Vilanova <vilanova@ac.upc.edu>"
 __license__    = "GPL version 2 or (at your option) any later version"
 
 __maintainer__ = "Stefan Hajnoczi"
-__email__      = "stefanha@linux.vnet.ibm.com"
+__email__      = "stefanha@redhat.com"
 
 
 from tracetool import out
diff --git a/scripts/tracetool/format/__init__.py b/scripts/tracetool/format/__init__.py
index aba2f7a441..2dc46f3dd9 100644
--- a/scripts/tracetool/format/__init__.py
+++ b/scripts/tracetool/format/__init__.py
@@ -32,7 +32,7 @@ __copyright__  = "Copyright 2012-2014, Lluís Vilanova <vilanova@ac.upc.edu>"
 __license__    = "GPL version 2 or (at your option) any later version"
 
 __maintainer__ = "Stefan Hajnoczi"
-__email__      = "stefanha@linux.vnet.ibm.com"
+__email__      = "stefanha@redhat.com"
 
 
 import os
diff --git a/scripts/tracetool/format/c.py b/scripts/tracetool/format/c.py
index 78af8aff72..23d82ea861 100644
--- a/scripts/tracetool/format/c.py
+++ b/scripts/tracetool/format/c.py
@@ -9,7 +9,7 @@ __copyright__  = "Copyright 2012-2014, Lluís Vilanova <vilanova@ac.upc.edu>"
 __license__    = "GPL version 2 or (at your option) any later version"
 
 __maintainer__ = "Stefan Hajnoczi"
-__email__      = "stefanha@linux.vnet.ibm.com"
+__email__      = "stefanha@redhat.com"
 
 
 from tracetool import out
diff --git a/scripts/tracetool/format/d.py b/scripts/tracetool/format/d.py
index d3980b914b..0afb5f3f47 100644
--- a/scripts/tracetool/format/d.py
+++ b/scripts/tracetool/format/d.py
@@ -9,7 +9,7 @@ __copyright__  = "Copyright 2012-2014, Lluís Vilanova <vilanova@ac.upc.edu>"
 __license__    = "GPL version 2 or (at your option) any later version"
 
 __maintainer__ = "Stefan Hajnoczi"
-__email__      = "stefanha@linux.vnet.ibm.com"
+__email__      = "stefanha@redhat.com"
 
 
 from tracetool import out
diff --git a/scripts/tracetool/format/h.py b/scripts/tracetool/format/h.py
index 83e1a2f355..e94f0be7da 100644
--- a/scripts/tracetool/format/h.py
+++ b/scripts/tracetool/format/h.py
@@ -9,7 +9,7 @@ __copyright__  = "Copyright 2012-2017, Lluís Vilanova <vilanova@ac.upc.edu>"
 __license__    = "GPL version 2 or (at your option) any later version"
 
 __maintainer__ = "Stefan Hajnoczi"
-__email__      = "stefanha@linux.vnet.ibm.com"
+__email__      = "stefanha@redhat.com"
 
 
 from tracetool import out
diff --git a/scripts/tracetool/format/stap.py b/scripts/tracetool/format/stap.py
index 8fc808f2ef..a218b0445c 100644
--- a/scripts/tracetool/format/stap.py
+++ b/scripts/tracetool/format/stap.py
@@ -9,7 +9,7 @@ __copyright__  = "Copyright 2012-2014, Lluís Vilanova <vilanova@ac.upc.edu>"
 __license__    = "GPL version 2 or (at your option) any later version"
 
 __maintainer__ = "Stefan Hajnoczi"
-__email__      = "stefanha@linux.vnet.ibm.com"
+__email__      = "stefanha@redhat.com"
 
 
 from tracetool import out
diff --git a/scripts/tracetool/format/tcg_h.py b/scripts/tracetool/format/tcg_h.py
index 0180e3d76c..33cf6a31b3 100644
--- a/scripts/tracetool/format/tcg_h.py
+++ b/scripts/tracetool/format/tcg_h.py
@@ -9,7 +9,7 @@ __copyright__  = "Copyright 2012-2017, Lluís Vilanova <vilanova@ac.upc.edu>"
 __license__    = "GPL version 2 or (at your option) any later version"
 
 __maintainer__ = "Stefan Hajnoczi"
-__email__      = "stefanha@linux.vnet.ibm.com"
+__email__      = "stefanha@redhat.com"
 
 
 from tracetool import out, Arguments
diff --git a/scripts/tracetool/format/tcg_helper_c.py b/scripts/tracetool/format/tcg_helper_c.py
index 6527b69afd..2db6317f3c 100644
--- a/scripts/tracetool/format/tcg_helper_c.py
+++ b/scripts/tracetool/format/tcg_helper_c.py
@@ -9,7 +9,7 @@ __copyright__  = "Copyright 2012-2017, Lluís Vilanova <vilanova@ac.upc.edu>"
 __license__    = "GPL version 2 or (at your option) any later version"
 
 __maintainer__ = "Stefan Hajnoczi"
-__email__      = "stefanha@linux.vnet.ibm.com"
+__email__      = "stefanha@redhat.com"
 
 
 from tracetool import Arguments, out
diff --git a/scripts/tracetool/format/tcg_helper_h.py b/scripts/tracetool/format/tcg_helper_h.py
index 98ebe52f18..08554fbc85 100644
--- a/scripts/tracetool/format/tcg_helper_h.py
+++ b/scripts/tracetool/format/tcg_helper_h.py
@@ -9,7 +9,7 @@ __copyright__  = "Copyright 2012-2016, Lluís Vilanova <vilanova@ac.upc.edu>"
 __license__    = "GPL version 2 or (at your option) any later version"
 
 __maintainer__ = "Stefan Hajnoczi"
-__email__      = "stefanha@linux.vnet.ibm.com"
+__email__      = "stefanha@redhat.com"
 
 
 from tracetool import out
diff --git a/scripts/tracetool/format/tcg_helper_wrapper_h.py b/scripts/tracetool/format/tcg_helper_wrapper_h.py
index 6adeab74df..0c5a9797d1 100644
--- a/scripts/tracetool/format/tcg_helper_wrapper_h.py
+++ b/scripts/tracetool/format/tcg_helper_wrapper_h.py
@@ -9,7 +9,7 @@ __copyright__  = "Copyright 2012-2016, Lluís Vilanova <vilanova@ac.upc.edu>"
 __license__    = "GPL version 2 or (at your option) any later version"
 
 __maintainer__ = "Stefan Hajnoczi"
-__email__      = "stefanha@linux.vnet.ibm.com"
+__email__      = "stefanha@redhat.com"
 
 
 from tracetool import out
diff --git a/scripts/tracetool/transform.py b/scripts/tracetool/transform.py
index 8fd4dcf20d..ea8b27799d 100644
--- a/scripts/tracetool/transform.py
+++ b/scripts/tracetool/transform.py
@@ -9,7 +9,7 @@ __copyright__  = "Copyright 2012-2016, Lluís Vilanova <vilanova@ac.upc.edu>"
 __license__    = "GPL version 2 or (at your option) any later version"
 
 __maintainer__ = "Stefan Hajnoczi"
-__email__      = "stefanha@linux.vnet.ibm.com"
+__email__      = "stefanha@redhat.com"
 
 
 def _transform_type(type_, trans):
diff --git a/scripts/tracetool/vcpu.py b/scripts/tracetool/vcpu.py
index 0b104e4f15..b54e4f4e7a 100644
--- a/scripts/tracetool/vcpu.py
+++ b/scripts/tracetool/vcpu.py
@@ -10,7 +10,7 @@ __copyright__  = "Copyright 2016, Lluís Vilanova <vilanova@ac.upc.edu>"
 __license__    = "GPL version 2 or (at your option) any later version"
 
 __maintainer__ = "Stefan Hajnoczi"
-__email__      = "stefanha@linux.vnet.ibm.com"
+__email__      = "stefanha@redhat.com"
 
 
 from tracetool import Arguments, try_import
-- 
2.26.2


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

* [PULL 2/2] trace/simple: Fix unauthorized enable
  2020-06-24 10:49 [PULL 0/2] Tracing patches Stefan Hajnoczi
  2020-06-24 10:49 ` [PULL 1/2] scripts/tracetool: Update maintainer email address Stefan Hajnoczi
@ 2020-06-24 10:49 ` Stefan Hajnoczi
  2020-06-25 14:27 ` [PULL 0/2] Tracing patches Peter Maydell
  2 siblings, 0 replies; 4+ messages in thread
From: Stefan Hajnoczi @ 2020-06-24 10:49 UTC (permalink / raw)
  To: qemu-devel
  Cc: Peter Maydell, Eduardo Habkost, Markus Armbruster, Gerd Hoffmann,
	Stefan Hajnoczi, Cleber Rosa, Paolo Bonzini,
	Philippe Mathieu-Daudé

From: Markus Armbruster <armbru@redhat.com>

st_set_trace_file() accidentally enables tracing.  It's called
unconditionally during startup, which is why QEMU built with the
simple trace backend always writes a trace file "trace-$PID".

This has been broken for quite a while.  I didn't track down the exact
commit.

Fix st_set_trace_file() to restore the state.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Message-id: 20200527065613.25322-1-armbru@redhat.com
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
---
 trace/simple.h |  2 +-
 trace/simple.c | 20 ++++++++++++++------
 2 files changed, 15 insertions(+), 7 deletions(-)

diff --git a/trace/simple.h b/trace/simple.h
index 5771a0634f..26ccbc8b8a 100644
--- a/trace/simple.h
+++ b/trace/simple.h
@@ -12,7 +12,7 @@
 #define TRACE_SIMPLE_H
 
 void st_print_trace_file_status(void);
-void st_set_trace_file_enabled(bool enable);
+bool st_set_trace_file_enabled(bool enable);
 void st_set_trace_file(const char *file);
 bool st_init(void);
 void st_flush_trace_buffer(void);
diff --git a/trace/simple.c b/trace/simple.c
index fc7106ec49..9cd2ed1fb3 100644
--- a/trace/simple.c
+++ b/trace/simple.c
@@ -302,10 +302,17 @@ static int st_write_event_mapping(void)
     return 0;
 }
 
-void st_set_trace_file_enabled(bool enable)
+/**
+ * Enable / disable tracing, return whether it was enabled.
+ *
+ * @enable: enable if %true, else disable.
+ */
+bool st_set_trace_file_enabled(bool enable)
 {
+    bool was_enabled = trace_fp;
+
     if (enable == !!trace_fp) {
-        return; /* no change */
+        return was_enabled;     /* no change */
     }
 
     /* Halt trace writeout */
@@ -323,14 +330,14 @@ void st_set_trace_file_enabled(bool enable)
 
         trace_fp = fopen(trace_file_name, "wb");
         if (!trace_fp) {
-            return;
+            return was_enabled;
         }
 
         if (fwrite(&header, sizeof header, 1, trace_fp) != 1 ||
             st_write_event_mapping() < 0) {
             fclose(trace_fp);
             trace_fp = NULL;
-            return;
+            return was_enabled;
         }
 
         /* Resume trace writeout */
@@ -340,6 +347,7 @@ void st_set_trace_file_enabled(bool enable)
         fclose(trace_fp);
         trace_fp = NULL;
     }
+    return was_enabled;
 }
 
 /**
@@ -350,7 +358,7 @@ void st_set_trace_file_enabled(bool enable)
  */
 void st_set_trace_file(const char *file)
 {
-    st_set_trace_file_enabled(false);
+    bool saved_enable = st_set_trace_file_enabled(false);
 
     g_free(trace_file_name);
 
@@ -361,7 +369,7 @@ void st_set_trace_file(const char *file)
         trace_file_name = g_strdup_printf("%s", file);
     }
 
-    st_set_trace_file_enabled(true);
+    st_set_trace_file_enabled(saved_enable);
 }
 
 void st_print_trace_file_status(void)
-- 
2.26.2


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

* Re: [PULL 0/2] Tracing patches
  2020-06-24 10:49 [PULL 0/2] Tracing patches Stefan Hajnoczi
  2020-06-24 10:49 ` [PULL 1/2] scripts/tracetool: Update maintainer email address Stefan Hajnoczi
  2020-06-24 10:49 ` [PULL 2/2] trace/simple: Fix unauthorized enable Stefan Hajnoczi
@ 2020-06-25 14:27 ` Peter Maydell
  2 siblings, 0 replies; 4+ messages in thread
From: Peter Maydell @ 2020-06-25 14:27 UTC (permalink / raw)
  To: Stefan Hajnoczi
  Cc: Paolo Bonzini, Cleber Rosa, Gerd Hoffmann, QEMU Developers,
	Eduardo Habkost

On Wed, 24 Jun 2020 at 11:49, Stefan Hajnoczi <stefanha@redhat.com> wrote:
>
> The following changes since commit d88d5a3806d78dcfca648c62dae9d88d3e803bd2:
>
>   Merge remote-tracking branch 'remotes/philmd-gitlab/tags/renesas-hw-2020062=
> 2' into staging (2020-06-23 13:55:52 +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 db25d56c014aa1a96319c663e0a60346a223b31e:
>
>   trace/simple: Fix unauthorized enable (2020-06-24 11:21:00 +0100)
>
> ----------------------------------------------------------------
> Pull request
>

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-06-25 14:28 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-06-24 10:49 [PULL 0/2] Tracing patches Stefan Hajnoczi
2020-06-24 10:49 ` [PULL 1/2] scripts/tracetool: Update maintainer email address Stefan Hajnoczi
2020-06-24 10:49 ` [PULL 2/2] trace/simple: Fix unauthorized enable Stefan Hajnoczi
2020-06-25 14:27 ` [PULL 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).