2 # -*- coding: utf-8 -*-
5 DTrace/SystemTAP backend.
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
25 if PROBEPREFIX
is None:
26 raise ValueError("you must set PROBEPREFIX")
34 raise ValueError("you must set BINARY")
38 def generate_h_begin(events
, group
):
40 header
= "trace-dtrace-root.h"
42 header
= "trace-dtrace.h"
44 out('#include "%s"' % header
,
48 def generate_h(event
, group
):
49 out(' QEMU_%(uppername)s(%(argnames)s);',
50 uppername
=event
.name
.upper(),
51 argnames
=", ".join(event
.args
.names()))