xref: /openbmc/qemu/scripts/tracetool/format/ust_events_c.py (revision 73d336510cf118fcc2ee7e98e774a193cf661614)
19530570fSMohamad Gebai# -*- coding: utf-8 -*-
29530570fSMohamad Gebai
39530570fSMohamad Gebai"""
430b572efSLluís Vilanovatrace/generated-ust.c
59530570fSMohamad Gebai"""
69530570fSMohamad Gebai
79530570fSMohamad Gebai__author__     = "Mohamad Gebai <mohamad.gebai@polymtl.ca>"
89530570fSMohamad Gebai__copyright__  = "Copyright 2012, Mohamad Gebai <mohamad.gebai@polymtl.ca>"
99530570fSMohamad Gebai__license__    = "GPL version 2 or (at your option) any later version"
109530570fSMohamad Gebai
119530570fSMohamad Gebai__maintainer__ = "Stefan Hajnoczi"
129530570fSMohamad Gebai__email__      = "stefanha@redhat.com"
139530570fSMohamad Gebai
149530570fSMohamad Gebai
159530570fSMohamad Gebaifrom tracetool import out
169530570fSMohamad Gebai
179530570fSMohamad Gebai
1880dd5c49SDaniel P. Berrangedef generate(events, backend, group):
191dad2ce9SLluís Vilanova    events = [e for e in events
201dad2ce9SLluís Vilanova              if "disabled" not in e.properties]
211dad2ce9SLluís Vilanova
229530570fSMohamad Gebai    out('/* This file is autogenerated by tracetool, do not edit. */',
239530570fSMohamad Gebai        '',
243174c64bSPeter Maydell        '#include "qemu/osdep.h"',
253174c64bSPeter Maydell        '',
269530570fSMohamad Gebai        '#define TRACEPOINT_DEFINE',
279530570fSMohamad Gebai        '#define TRACEPOINT_CREATE_PROBES',
289530570fSMohamad Gebai        '',
299530570fSMohamad Gebai        '/* If gcc version 4.7 or older is used, LTTng ust gives a warning when compiling with',
309530570fSMohamad Gebai        '   -Wredundant-decls.',
319530570fSMohamad Gebai        ' */',
329530570fSMohamad Gebai        '#pragma GCC diagnostic ignored "-Wredundant-decls"',
339530570fSMohamad Gebai        '',
34*0ab8ed18SDaniel P. Berrange        '#include "trace-ust-all.h"')
35