usb: ccid: check ccid apdu length
[qemu/ar7.git] / scripts / tracetool / backend / dtrace.py
blobc469cbd1a352a920626736131b1078980d9415aa
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, group):
39 if group == "root":
40 header = "trace-dtrace-root.h"
41 else:
42 header = "trace-dtrace.h"
44 out('#include "%s"' % header,
45 '')
48 def generate_h(event, group):
49 out(' QEMU_%(uppername)s(%(argnames)s);',
50 uppername=event.name.upper(),
51 argnames=", ".join(event.args.names()))