aboutsummaryrefslogtreecommitdiff
path: root/scripts/tracetool/format/d.py
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/tracetool/format/d.py')
-rw-r--r--scripts/tracetool/format/d.py26
1 files changed, 24 insertions, 2 deletions
diff --git a/scripts/tracetool/format/d.py b/scripts/tracetool/format/d.py
index 74ee0d3626..46eebb128b 100644
--- a/scripts/tracetool/format/d.py
+++ b/scripts/tracetool/format/d.py
@@ -16,5 +16,27 @@ __email__ = "stefanha@linux.vnet.ibm.com"
from tracetool import out
-def begin(events):
- out('/* This file is autogenerated by tracetool, do not edit. */')
+def generate(events, backend):
+ events = [e for e in events
+ if "disable" not in e.properties]
+
+ out('/* This file is autogenerated by tracetool, do not edit. */'
+ '',
+ 'provider qemu {')
+
+ for e in events:
+ args = str(e.args)
+
+ # DTrace provider syntax expects foo() for empty
+ # params, not foo(void)
+ if args == 'void':
+ args = ''
+
+ # Define prototype for probe arguments
+ out('',
+ 'probe %(name)s(%(args)s);',
+ name=e.name,
+ args=args)
+
+ out('',
+ '};')