util: drop inet_nonblocking_connect()
[qemu/ar7.git] / scripts / tracetool / backend / dtrace.py
blobab9ecfab301e600a6b1ef33f29184bf3e4142985
1 #!/usr/bin/env python
2 # -*- coding: utf-8 -*-
4 """
5 DTrace/SystemTAP backend.
6 """
8 __author__ = "Lluís Vilanova <vilanova@ac.upc.edu>"
9 __copyright__ = "Copyright 2012-2016, Lluís Vilanova <vilanova@ac.upc.edu>"
10 __license__ = "GPL version 2 or (at your option) any later version"
12 __maintainer__ = "Stefan Hajnoczi"
13 __email__ = "stefanha@linux.vnet.ibm.com"
16 from tracetool import out
19 PUBLIC = True
22 PROBEPREFIX = None
24 def probeprefix():
25 if PROBEPREFIX is None:
26 raise ValueError("you must set PROBEPREFIX")
27 return PROBEPREFIX
30 BINARY = None
32 def binary():
33 if BINARY is None:
34 raise ValueError("you must set BINARY")
35 return BINARY
38 def generate_h_begin(events):
39 out('#include "trace/generated-tracers-dtrace.h"',
40 '')
43 def generate_h(event):
44 out(' QEMU_%(uppername)s(%(argnames)s);',
45 uppername=event.name.upper(),
46 argnames=", ".join(event.args.names()))