Merge remote-tracking branch 'remotes/dgilbert-gitlab/tags/pull-virtiofs-20210413...
[qemu/ar7.git] / scripts / tracetool / format / ust_events_c.py
blobdeced9533ddfa730f39456c292553ce075ac4622
1 # -*- coding: utf-8 -*-
3 """
4 trace/generated-ust.c
5 """
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"
11 __maintainer__ = "Stefan Hajnoczi"
12 __email__ = "stefanha@redhat.com"
15 from tracetool import out
18 def generate(events, backend, group):
19 events = [e for e in events
20 if "disabled" not in e.properties]
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"')