2 # -*- coding: utf-8 -*-
5 Generate .h for LTTng ust event description.
8 __author__
= "Mohamad Gebai <mohamad.gebai@polymtl.ca>"
9 __copyright__
= "Copyright 2012, Mohamad Gebai <mohamad.gebai@polymtl.ca>"
10 __license__
= "GPL version 2 or (at your option) any later version"
12 __maintainer__
= "Stefan Hajnoczi"
13 __email__
= "stefanha@redhat.com"
16 from tracetool
import out
20 out('/* This file is autogenerated by tracetool, do not edit. */',
22 '#undef TRACEPOINT_PROVIDER',
23 '#define TRACEPOINT_PROVIDER qemu',
25 '#undef TRACEPOINT_INCLUDE_FILE',
26 '#define TRACEPOINT_INCLUDE_FILE ./generated-ust-provider.h',
28 '#if !defined (TRACE__GENERATED_UST_H) || defined(TRACEPOINT_HEADER_MULTI_READ)',
29 '#define TRACE__GENERATED_UST_H',
31 '#include "qemu-common.h"',
32 '#include <lttng/tracepoint.h>',
35 ' * LTTng ust 2.0 does not allow you to use TP_ARGS(void) for tracepoints',
36 ' * requiring no arguments. We define these macros introduced in more recent'
37 ' * versions of LTTng ust as a workaround',
39 '#ifndef _TP_EXPROTO1',
40 '#define _TP_EXPROTO1(a) void',
42 '#ifndef _TP_EXDATA_PROTO1',
43 '#define _TP_EXDATA_PROTO1(a) void *__tp_data',
45 '#ifndef _TP_EXDATA_VAR1',
46 '#define _TP_EXDATA_VAR1(a) __tp_data',
49 '#define _TP_EXVAR1(a)',
54 out('#endif /* TRACE__GENERATED_UST_H */',
56 '/* This part must be outside ifdef protection */',
57 '#include <lttng/tracepoint-event.h>')