]>
git.proxmox.com Git - mirror_qemu.git/blob - scripts/tracetool/backend/ust.py
1 # -*- coding: utf-8 -*-
4 LTTng User Space Tracing backend.
7 __author__
= "Lluís Vilanova <vilanova@ac.upc.edu>"
8 __copyright__
= "Copyright 2012-2017, Lluís Vilanova <vilanova@ac.upc.edu>"
9 __license__
= "GPL version 2 or (at your option) any later version"
11 __maintainer__
= "Stefan Hajnoczi"
12 __email__
= "stefanha@redhat.com"
15 from tracetool
import out
21 def generate_h_begin(events
, group
):
23 header
= "trace-ust-root.h"
25 header
= "trace-ust.h"
27 out('#include <lttng/tracepoint.h>',
28 '#include "%s"' % header
,
30 '/* tracepoint_enabled() was introduced in LTTng UST 2.7 */',
31 '#ifndef tracepoint_enabled',
32 '#define tracepoint_enabled(a, b) true',
37 def generate_h(event
, group
):
38 argnames
= ", ".join(event
.args
.names())
39 if len(event
.args
) > 0:
40 argnames
= ", " + argnames
42 out(' tracepoint(qemu, %(name)s%(tp_args)s);',
47 def generate_h_backend_dstate(event
, group
):
48 out(' tracepoint_enabled(qemu, %(name)s) || \\',