aboutsummaryrefslogtreecommitdiff
path: root/scripts/tracetool/__init__.py
diff options
context:
space:
mode:
authorLluís Vilanova <vilanova@ac.upc.edu>2012-04-03 20:48:12 +0200
committerStefan Hajnoczi <stefanha@linux.vnet.ibm.com>2012-04-18 14:03:00 +0100
commit52ef093aceddbe43dcc2cb4190e2178036dac60b (patch)
tree14249894e48fb2fe10f2ff7020ca30f850316db8 /scripts/tracetool/__init__.py
parentfbc54b9412a905c460d0f5e9e0508d64f9e9759b (diff)
tracetool: Add support for the 'dtrace' backend
Signed-off-by: Lluís Vilanova <vilanova@ac.upc.edu> Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Diffstat (limited to 'scripts/tracetool/__init__.py')
-rw-r--r--scripts/tracetool/__init__.py11
1 files changed, 10 insertions, 1 deletions
diff --git a/scripts/tracetool/__init__.py b/scripts/tracetool/__init__.py
index 1719bb4f92..74fe21b226 100644
--- a/scripts/tracetool/__init__.py
+++ b/scripts/tracetool/__init__.py
@@ -212,7 +212,8 @@ def try_import(mod_name, attr_name = None, attr_default = None):
return False, None
-def generate(fevents, format, backend):
+def generate(fevents, format, backend,
+ binary = None, probe_prefix = None):
"""Generate the output for the given (format, backend) pair.
Parameters
@@ -223,6 +224,10 @@ def generate(fevents, format, backend):
Output format name.
backend : str
Output backend name.
+ binary : str or None
+ See tracetool.backend.dtrace.BINARY.
+ probe_prefix : str or None
+ See tracetool.backend.dtrace.PROBEPREFIX.
"""
# fix strange python error (UnboundLocalError tracetool)
import tracetool
@@ -245,6 +250,10 @@ def generate(fevents, format, backend):
raise TracetoolError("backend '%s' not compatible with format '%s'" %
(backend, format))
+ import tracetool.backend.dtrace
+ tracetool.backend.dtrace.BINARY = binary
+ tracetool.backend.dtrace.PROBEPREFIX = probe_prefix
+
events = _read_events(fevents)
if backend == "nop":