From bd200384c515bdc84d52f1735c0fea43c8f61e11 Mon Sep 17 00:00:00 2001 From: Stefan Hajnoczi Date: Wed, 9 Oct 2019 14:51:54 +0100 Subject: trace: add --group=all to tracing.txt MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit tracetool needs to know the group name ("all", "root", or a specific subdirectory). Also remove the stdin redirection because tracetool.py needs the path to the trace-events file. Update the documentation. Fixes: 2098c56a9bc5901e145fa5d4759f075808811685 ("trace: move setting of group name into Makefiles") Buglink: https://bugs.launchpad.net/bugs/1844814 Reported-by: Philippe Mathieu-Daudé Reviewed-by: Daniel P. Berrangé Reviewed-by: Philippe Mathieu-Daudé Tested-by: Philippe Mathieu-Daudé Signed-off-by: Stefan Hajnoczi Message-Id: <20191009135154.10970-1-stefanha@redhat.com> --- docs/devel/tracing.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/devel/tracing.txt b/docs/devel/tracing.txt index 8231bbf5d1..8c0376fefa 100644 --- a/docs/devel/tracing.txt +++ b/docs/devel/tracing.txt @@ -317,7 +317,8 @@ probes: --binary path/to/qemu-binary \ --target-type system \ --target-name x86_64 \ - qemu.stp + --group=all \ + trace-events-all >qemu.stp To facilitate simple usage of systemtap where there merely needs to be printf logging of certain probes, a helper script "qemu-trace-stap" is provided. -- cgit v1.2.3 From 403e11edbfad5da2e6d5842adc9222f60e76ee43 Mon Sep 17 00:00:00 2001 From: Stefan Hajnoczi Date: Thu, 10 Oct 2019 13:21:54 +0100 Subject: trace: avoid "is" with a literal Python 3.8 warnings MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The following statement produces a SyntaxWarning with Python 3.8: if len(format) is 0: scripts/tracetool/__init__.py:459: SyntaxWarning: "is" with a literal. Did you mean "=="? Use the conventional len(x) == 0 syntax instead. Reported-by: Daniel P. Berrangé Reviewed-by: Daniel P. Berrangé Reviewed-by: Philippe Mathieu-Daudé Message-Id: <20191010122154.10553-1-stefanha@redhat.com> Signed-off-by: Stefan Hajnoczi --- scripts/tracetool/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/tracetool/__init__.py b/scripts/tracetool/__init__.py index 04279fa62e..44c118bc2a 100644 --- a/scripts/tracetool/__init__.py +++ b/scripts/tracetool/__init__.py @@ -456,12 +456,12 @@ def generate(events, group, format, backends, import tracetool format = str(format) - if len(format) is 0: + if len(format) == 0: raise TracetoolError("format not set") if not tracetool.format.exists(format): raise TracetoolError("unknown format: %s" % format) - if len(backends) is 0: + if len(backends) == 0: raise TracetoolError("no backends specified") for backend in backends: if not tracetool.backend.exists(backend): -- cgit v1.2.3