diff options
Diffstat (limited to 'scripts/tracetool/backend/dtrace.py')
-rw-r--r-- | scripts/tracetool/backend/dtrace.py | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/scripts/tracetool/backend/dtrace.py b/scripts/tracetool/backend/dtrace.py index c6812b70a2..c2f3a4e5a8 100644 --- a/scripts/tracetool/backend/dtrace.py +++ b/scripts/tracetool/backend/dtrace.py @@ -44,8 +44,20 @@ def generate_h_begin(events, group): out('#include "%s"' % header, '') + # SystemTap defines <provider>_<name>_ENABLED() but other DTrace + # implementations might not. + for e in events: + out('#ifndef QEMU_%(uppername)s_ENABLED', + '#define QEMU_%(uppername)s_ENABLED() true', + '#endif', + uppername=e.name.upper()) def generate_h(event, group): out(' QEMU_%(uppername)s(%(argnames)s);', uppername=event.name.upper(), argnames=", ".join(event.args.names())) + + +def generate_h_backend_dstate(event, group): + out(' QEMU_%(uppername)s_ENABLED() || \\', + uppername=event.name.upper()) |