summary refs log tree commit diff stats
path: root/scripts/tracetool.py
diff options
context:
space:
mode:
authorDaniel P. Berrange <berrange@redhat.com>2016-10-04 14:35:57 +0100
committerStefan Hajnoczi <stefanha@redhat.com>2016-10-12 09:54:52 +0200
commit9096b78a38a22963ca59bb16d54a772aa86d5159 (patch)
tree4e779f2acd0f30ccfe295cf14c0e165eb48bb49a /scripts/tracetool.py
parentd1b97bcea3586bad572879f22437f44c690874cb (diff)
downloadfocaccia-qemu-9096b78a38a22963ca59bb16d54a772aa86d5159.tar.gz
focaccia-qemu-9096b78a38a22963ca59bb16d54a772aa86d5159.zip
trace: push reading of events up a level to tracetool main
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 <stefanha@redhat.com>
Reviewed-by: LluĂ­s Vilanova <vilanova@ac.upc.edu>
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
Message-id: 1475588159-30598-19-git-send-email-berrange@redhat.com
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Diffstat (limited to 'scripts/tracetool.py')
-rwxr-xr-xscripts/tracetool.py4
1 files changed, 3 insertions, 1 deletions
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))