qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PULL 0/1] Tracing patches
@ 2020-01-14  9:29 Stefan Hajnoczi
  2020-01-14  9:29 ` [PULL 1/1] trace: update qemu-trace-stap to Python 3 Stefan Hajnoczi
  2020-01-14 14:11 ` [PULL 0/1] Tracing patches Peter Maydell
  0 siblings, 2 replies; 9+ messages in thread
From: Stefan Hajnoczi @ 2020-01-14  9:29 UTC (permalink / raw)
  To: qemu-devel; +Cc: Peter Maydell, Stefan Hajnoczi

The following changes since commit dc65a5bdc9fa543690a775b50d4ffbeb22c56d6d:

  Merge remote-tracking branch 'remotes/dgibson/tags/ppc-for-5.0-20200108' into staging (2020-01-10 16:15:04 +0000)

are available in the Git repository at:

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

for you to fetch changes up to 3f0097169bb60268cc5dda0c5ea47c31ab57b22f:

  trace: update qemu-trace-stap to Python 3 (2020-01-13 16:42:20 +0000)

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

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

Stefan Hajnoczi (1):
  trace: update qemu-trace-stap to Python 3

 scripts/qemu-trace-stap | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

-- 
2.24.1



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

* [PULL 1/1] trace: update qemu-trace-stap to Python 3
  2020-01-14  9:29 [PULL 0/1] Tracing patches Stefan Hajnoczi
@ 2020-01-14  9:29 ` Stefan Hajnoczi
  2020-01-14 13:00   ` Philippe Mathieu-Daudé
  2020-01-14 14:11 ` [PULL 0/1] Tracing patches Peter Maydell
  1 sibling, 1 reply; 9+ messages in thread
From: Stefan Hajnoczi @ 2020-01-14  9:29 UTC (permalink / raw)
  To: qemu-devel; +Cc: Peter Maydell, Daniel P . Berrangé, Stefan Hajnoczi

qemu-trace-stap does not support Python 3 yet:

  $ scripts/qemu-trace-stap list path/to/qemu-system-x86_64
  Traceback (most recent call last):
    File "scripts/qemu-trace-stap", line 175, in <module>
      main()
    File "scripts/qemu-trace-stap", line 171, in main
      args.func(args)
    File "scripts/qemu-trace-stap", line 118, in cmd_list
      print_probes(args.verbose, "*")
    File "scripts/qemu-trace-stap", line 114, in print_probes
      if line.startswith(prefix):
  TypeError: startswith first arg must be bytes or a tuple of bytes, not str

Now that QEMU requires Python 3.5 or later we can switch to pure Python
3.  Use Popen()'s universal_newlines=True argument to treat stdout as
text instead of binary.

Fixes: 62dd1048c0bd ("trace: add ability to do simple printf logging via systemtap")
Buglink: https://bugzilla.redhat.com/show_bug.cgi?id=1787395
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Message-id: 20200107112438.383958-1-stefanha@redhat.com
Message-Id: <20200107112438.383958-1-stefanha@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
---
 scripts/qemu-trace-stap | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/scripts/qemu-trace-stap b/scripts/qemu-trace-stap
index 91d1051cdc..90527eb974 100755
--- a/scripts/qemu-trace-stap
+++ b/scripts/qemu-trace-stap
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/env python3
 # -*- python -*-
 #
 # Copyright (C) 2019 Red Hat, Inc
@@ -18,8 +18,6 @@
 # You should have received a copy of the GNU General Public License
 # along with this program; if not, see <http://www.gnu.org/licenses/>.
 
-from __future__ import print_function
-
 import argparse
 import copy
 import os.path
@@ -104,7 +102,9 @@ def cmd_list(args):
         if verbose:
             print("Listing probes with name '%s'" % script)
         proc = subprocess.Popen(["stap", "-l", script],
-                                stdout=subprocess.PIPE, env=tapset_env(tapsets))
+                                stdout=subprocess.PIPE,
+                                universal_newlines=True,
+                                env=tapset_env(tapsets))
         out, err = proc.communicate()
         if proc.returncode != 0:
             print("No probes found, are the tapsets installed in %s" % tapset_dir(args.binary))
-- 
2.24.1



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

* Re: [PULL 1/1] trace: update qemu-trace-stap to Python 3
  2020-01-14  9:29 ` [PULL 1/1] trace: update qemu-trace-stap to Python 3 Stefan Hajnoczi
@ 2020-01-14 13:00   ` Philippe Mathieu-Daudé
  0 siblings, 0 replies; 9+ messages in thread
From: Philippe Mathieu-Daudé @ 2020-01-14 13:00 UTC (permalink / raw)
  To: Stefan Hajnoczi, qemu-devel; +Cc: Peter Maydell, Daniel P . Berrangé

On 1/14/20 10:29 AM, Stefan Hajnoczi wrote:
> qemu-trace-stap does not support Python 3 yet:
> 
>    $ scripts/qemu-trace-stap list path/to/qemu-system-x86_64
>    Traceback (most recent call last):
>      File "scripts/qemu-trace-stap", line 175, in <module>
>        main()
>      File "scripts/qemu-trace-stap", line 171, in main
>        args.func(args)
>      File "scripts/qemu-trace-stap", line 118, in cmd_list
>        print_probes(args.verbose, "*")
>      File "scripts/qemu-trace-stap", line 114, in print_probes
>        if line.startswith(prefix):
>    TypeError: startswith first arg must be bytes or a tuple of bytes, not str
> 
> Now that QEMU requires Python 3.5 or later we can switch to pure Python
> 3.  Use Popen()'s universal_newlines=True argument to treat stdout as
> text instead of binary.
> 
> Fixes: 62dd1048c0bd ("trace: add ability to do simple printf logging via systemtap")
> Buglink: https://bugzilla.redhat.com/show_bug.cgi?id=1787395
> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
> Message-id: 20200107112438.383958-1-stefanha@redhat.com
> Message-Id: <20200107112438.383958-1-stefanha@redhat.com>

One Message-Id is enough ;)

> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
> ---
>   scripts/qemu-trace-stap | 8 ++++----
>   1 file changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/scripts/qemu-trace-stap b/scripts/qemu-trace-stap
> index 91d1051cdc..90527eb974 100755
> --- a/scripts/qemu-trace-stap
> +++ b/scripts/qemu-trace-stap
> @@ -1,4 +1,4 @@
> -#!/usr/bin/python
> +#!/usr/bin/env python3
>   # -*- python -*-
>   #
>   # Copyright (C) 2019 Red Hat, Inc
> @@ -18,8 +18,6 @@
>   # You should have received a copy of the GNU General Public License
>   # along with this program; if not, see <http://www.gnu.org/licenses/>.
>   
> -from __future__ import print_function
> -
>   import argparse
>   import copy
>   import os.path
> @@ -104,7 +102,9 @@ def cmd_list(args):
>           if verbose:
>               print("Listing probes with name '%s'" % script)
>           proc = subprocess.Popen(["stap", "-l", script],
> -                                stdout=subprocess.PIPE, env=tapset_env(tapsets))
> +                                stdout=subprocess.PIPE,
> +                                universal_newlines=True,
> +                                env=tapset_env(tapsets))
>           out, err = proc.communicate()
>           if proc.returncode != 0:
>               print("No probes found, are the tapsets installed in %s" % tapset_dir(args.binary))
> 



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

* Re: [PULL 0/1] Tracing patches
  2020-01-14  9:29 [PULL 0/1] Tracing patches Stefan Hajnoczi
  2020-01-14  9:29 ` [PULL 1/1] trace: update qemu-trace-stap to Python 3 Stefan Hajnoczi
@ 2020-01-14 14:11 ` Peter Maydell
  1 sibling, 0 replies; 9+ messages in thread
From: Peter Maydell @ 2020-01-14 14:11 UTC (permalink / raw)
  To: Stefan Hajnoczi; +Cc: QEMU Developers

On Tue, 14 Jan 2020 at 09:29, Stefan Hajnoczi <stefanha@redhat.com> wrote:
>
> The following changes since commit dc65a5bdc9fa543690a775b50d4ffbeb22c56d6d:
>
>   Merge remote-tracking branch 'remotes/dgibson/tags/ppc-for-5.0-20200108' into staging (2020-01-10 16:15:04 +0000)
>
> are available in the Git repository at:
>
>   https://github.com/stefanha/qemu.git tags/tracing-pull-request
>
> for you to fetch changes up to 3f0097169bb60268cc5dda0c5ea47c31ab57b22f:
>
>   trace: update qemu-trace-stap to Python 3 (2020-01-13 16:42:20 +0000)
>
> ----------------------------------------------------------------
> Pull request
>
> ----------------------------------------------------------------



Applied, thanks.

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

-- PMM


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

* [PULL 0/1] Tracing patches
@ 2023-12-27 10:02 Stefan Hajnoczi
  0 siblings, 0 replies; 9+ messages in thread
From: Stefan Hajnoczi @ 2023-12-27 10:02 UTC (permalink / raw)
  To: qemu-devel; +Cc: Mads Ynddal, Stefan Hajnoczi

The following changes since commit 455f4440687fcee03e62d9b17b28162b638458af:

  Merge tag 'for_upstream' of https://git.kernel.org/pub/scm/virt/kvm/mst/qemu into staging (2023-12-26 06:07:16 -0500)

are available in the Git repository at:

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

for you to fetch changes up to 5db052306e69faf9f875ad6dec7c823c140990e0:

  tracing: install trace events file only if necessary (2023-12-27 05:01:55 -0500)

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

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

Carlos Santos (1):
  tracing: install trace events file only if necessary

 trace/meson.build | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

-- 
2.43.0



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

* Re: [PULL 0/1] Tracing patches
  2023-11-09  7:04 Stefan Hajnoczi
@ 2023-11-10  2:25 ` Stefan Hajnoczi
  0 siblings, 0 replies; 9+ messages in thread
From: Stefan Hajnoczi @ 2023-11-10  2:25 UTC (permalink / raw)
  To: Stefan Hajnoczi; +Cc: qemu-devel, Mads Ynddal, Stefan Hajnoczi

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

Applied, thanks.

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

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

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

* [PULL 0/1] Tracing patches
@ 2023-11-09  7:04 Stefan Hajnoczi
  2023-11-10  2:25 ` Stefan Hajnoczi
  0 siblings, 1 reply; 9+ messages in thread
From: Stefan Hajnoczi @ 2023-11-09  7:04 UTC (permalink / raw)
  To: qemu-devel; +Cc: Mads Ynddal, Stefan Hajnoczi

The following changes since commit a3c3aaa846ad61b801e7196482dcf4afb8ba34e4:

  Merge tag 'pull-ppc-20231107' of https://gitlab.com/danielhb/qemu into staging (2023-11-08 20:35:00 +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 4d96307c5b4fac40c6ca25f38318b4b65d315de0:

  tracetool: avoid invalid escape in Python string (2023-11-09 15:03:02 +0800)

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

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

Marc-André Lureau (1):
  tracetool: avoid invalid escape in Python string

 scripts/tracetool/__init__.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

-- 
2.41.0



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

* Re: [PULL 0/1] Tracing patches
  2020-07-07 15:20 Stefan Hajnoczi
@ 2020-07-10 10:29 ` Peter Maydell
  0 siblings, 0 replies; 9+ messages in thread
From: Peter Maydell @ 2020-07-10 10:29 UTC (permalink / raw)
  To: Stefan Hajnoczi
  Cc: Paolo Bonzini, Cleber Rosa, QEMU Developers, Eduardo Habkost,
	Gerd Hoffmann

On Tue, 7 Jul 2020 at 16:20, Stefan Hajnoczi <stefanha@redhat.com> wrote:
>
> The following changes since commit 7623b5ba017f61de5d7c2bba12c6feb3d55091b1:
>
>   Merge remote-tracking branch 'remotes/vivier2/tags/linux-user-for-5.1-pull-request' into staging (2020-07-06 11:40:10 +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 27e08bab94f7c6ebe0b75938c98c394c969e3fd8:
>
>   tracetool: work around ust <sys/sdt.h> include conflict (2020-07-07 16:07:14 +0100)
>
> ----------------------------------------------------------------
> Pull request
>
> Fix for a LTTng Userspace Tracer header problem.
>
> ----------------------------------------------------------------
>
> Stefan Hajnoczi (1):
>   tracetool: work around ust <sys/sdt.h> include conflict
>
>  scripts/tracetool/backend/dtrace.py | 6 ++++++
>  1 file changed, 6 insertions(+)


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] 9+ messages in thread

* [PULL 0/1] Tracing patches
@ 2020-07-07 15:20 Stefan Hajnoczi
  2020-07-10 10:29 ` Peter Maydell
  0 siblings, 1 reply; 9+ messages in thread
From: Stefan Hajnoczi @ 2020-07-07 15:20 UTC (permalink / raw)
  To: qemu-devel
  Cc: Peter Maydell, Eduardo Habkost, Gerd Hoffmann, Stefan Hajnoczi,
	Cleber Rosa, Paolo Bonzini

The following changes since commit 7623b5ba017f61de5d7c2bba12c6feb3d55091b1:

  Merge remote-tracking branch 'remotes/vivier2/tags/linux-user-for-5.1-pull-request' into staging (2020-07-06 11:40:10 +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 27e08bab94f7c6ebe0b75938c98c394c969e3fd8:

  tracetool: work around ust <sys/sdt.h> include conflict (2020-07-07 16:07:14 +0100)

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

Fix for a LTTng Userspace Tracer header problem.

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

Stefan Hajnoczi (1):
  tracetool: work around ust <sys/sdt.h> include conflict

 scripts/tracetool/backend/dtrace.py | 6 ++++++
 1 file changed, 6 insertions(+)

-- 
2.26.2


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

end of thread, other threads:[~2023-12-27 10:07 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-01-14  9:29 [PULL 0/1] Tracing patches Stefan Hajnoczi
2020-01-14  9:29 ` [PULL 1/1] trace: update qemu-trace-stap to Python 3 Stefan Hajnoczi
2020-01-14 13:00   ` Philippe Mathieu-Daudé
2020-01-14 14:11 ` [PULL 0/1] Tracing patches Peter Maydell
2020-07-07 15:20 Stefan Hajnoczi
2020-07-10 10:29 ` Peter Maydell
2023-11-09  7:04 Stefan Hajnoczi
2023-11-10  2:25 ` Stefan Hajnoczi
2023-12-27 10:02 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).