]>
Commit | Line | Data |
---|---|---|
fbc54b94 LV |
1 | #!/usr/bin/env python |
2 | # -*- coding: utf-8 -*- | |
3 | ||
4 | """ | |
5 | LTTng User Space Tracing backend. | |
6 | """ | |
7 | ||
8 | __author__ = "Lluís Vilanova <vilanova@ac.upc.edu>" | |
7d08f0da | 9 | __copyright__ = "Copyright 2012-2014, Lluís Vilanova <vilanova@ac.upc.edu>" |
fbc54b94 LV |
10 | __license__ = "GPL version 2 or (at your option) any later version" |
11 | ||
12 | __maintainer__ = "Stefan Hajnoczi" | |
13 | __email__ = "stefanha@linux.vnet.ibm.com" | |
14 | ||
15 | ||
16 | from tracetool import out | |
17 | ||
18 | ||
93fba161 LV |
19 | PUBLIC = True |
20 | ||
9530570f | 21 | |
1dad2ce9 | 22 | def generate_h_begin(events): |
9530570f MG |
23 | out('#include <lttng/tracepoint.h>', |
24 | '#include "trace/generated-ust-provider.h"', | |
25 | '') | |
fbc54b94 | 26 | |
9530570f | 27 | |
1dad2ce9 LV |
28 | def generate_h(event): |
29 | argnames = ", ".join(event.args.names()) | |
30 | if len(event.args) > 0: | |
31 | argnames = ", " + argnames | |
9530570f | 32 | |
1dad2ce9 LV |
33 | out(' tracepoint(qemu, %(name)s%(tp_args)s);', |
34 | name=event.name, | |
35 | tp_args=argnames) |