1# -*- coding: utf-8 -*-
2
3"""
4trace/generated-ust.c
5"""
6
7__author__     = "Mohamad Gebai <mohamad.gebai@polymtl.ca>"
8__copyright__  = "Copyright 2012, Mohamad Gebai <mohamad.gebai@polymtl.ca>"
9__license__    = "GPL version 2 or (at your option) any later version"
10
11__maintainer__ = "Stefan Hajnoczi"
12__email__      = "stefanha@redhat.com"
13
14
15from tracetool import out
16
17
18def generate(events, backend, group):
19    events = [e for e in events
20              if "disabled" not in e.properties]
21
22    out('/* This file is autogenerated by tracetool, do not edit. */',
23        '',
24        '#include "qemu/osdep.h"',
25        '',
26        '#define TRACEPOINT_DEFINE',
27        '#define TRACEPOINT_CREATE_PROBES',
28        '',
29        '/* If gcc version 4.7 or older is used, LTTng ust gives a warning when compiling with',
30        '   -Wredundant-decls.',
31        ' */',
32        '#pragma GCC diagnostic ignored "-Wredundant-decls"',
33        '',
34        '#include "trace-ust-all.h"')
35