usb: ccid: check ccid apdu length
[qemu/ar7.git] / scripts / tracetool / backend / ust.py
blob52ce892478ba750d4bfb28b517758e7a35eadad0
1 #!/usr/bin/env python
2 # -*- coding: utf-8 -*-
4 """
5 LTTng User Space Tracing 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 def generate_h_begin(events, group):
23 if group == "root":
24 header = "trace-ust-root.h"
25 else:
26 header = "trace-ust.h"
28 out('#include <lttng/tracepoint.h>',
29 '#include "%s"' % header,
30 '')
33 def generate_h(event, group):
34 argnames = ", ".join(event.args.names())
35 if len(event.args) > 0:
36 argnames = ", " + argnames
38 out(' tracepoint(qemu, %(name)s%(tp_args)s);',
39 name=event.name,
40 tp_args=argnames)