blob: 264784cdf2a3d8597b95f7fb0972587ebac4a73c [file] [log] [blame]
Mohamad Gebai95305702014-01-29 22:47:55 -05001#!/usr/bin/env python
2# -*- coding: utf-8 -*-
3
4"""
Lluís Vilanova30b572e2014-02-23 20:37:30 +01005trace/generated-ust.c
Mohamad Gebai95305702014-01-29 22:47:55 -05006"""
7
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"
11
12__maintainer__ = "Stefan Hajnoczi"
13__email__ = "stefanha@redhat.com"
14
15
16from tracetool import out
17
18
Daniel P. Berrange80dd5c42016-10-04 14:35:59 +010019def generate(events, backend, group):
Lluís Vilanova1dad2ce2014-02-23 20:37:40 +010020 events = [e for e in events
21 if "disabled" not in e.properties]
22
Mohamad Gebai95305702014-01-29 22:47:55 -050023 out('/* This file is autogenerated by tracetool, do not edit. */',
24 '',
Peter Maydell3174c642016-02-23 15:17:41 +000025 '#include "qemu/osdep.h"',
26 '',
Mohamad Gebai95305702014-01-29 22:47:55 -050027 '#define TRACEPOINT_DEFINE',
28 '#define TRACEPOINT_CREATE_PROBES',
29 '',
30 '/* If gcc version 4.7 or older is used, LTTng ust gives a warning when compiling with',
31 ' -Wredundant-decls.',
32 ' */',
33 '#pragma GCC diagnostic ignored "-Wredundant-decls"',
34 '',
Daniel P. Berrange0ab8ed12017-01-25 16:14:15 +000035 '#include "trace-ust-all.h"')