From 9096b78a38a22963ca59bb16d54a772aa86d5159 Mon Sep 17 00:00:00 2001 From: "Daniel P. Berrange" Date: Tue, 4 Oct 2016 14:35:57 +0100 Subject: trace: push reading of events up a level to tracetool main MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Move the reading of events out of the 'tracetool.generate' method and into tracetool.main, so that the latter is not tied to generating from a single source of events. Reviewed-by: Stefan Hajnoczi Reviewed-by: LluĂ­s Vilanova Signed-off-by: Daniel P. Berrange Message-id: 1475588159-30598-19-git-send-email-berrange@redhat.com Signed-off-by: Stefan Hajnoczi --- scripts/tracetool.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'scripts/tracetool.py') diff --git a/scripts/tracetool.py b/scripts/tracetool.py index 7b82959e84..6accbbff69 100755 --- a/scripts/tracetool.py +++ b/scripts/tracetool.py @@ -129,8 +129,10 @@ def main(args): if probe_prefix is None: probe_prefix = ".".join(["qemu", target_type, target_name]) + events = tracetool.read_events(sys.stdin) + try: - tracetool.generate(sys.stdin, arg_format, arg_backends, + tracetool.generate(events, arg_format, arg_backends, binary=binary, probe_prefix=probe_prefix) except tracetool.TracetoolError as e: error_opt(str(e)) -- cgit v1.2.3