X-Git-Url: https://repo.jachan.dev/qemu.git/blobdiff_plain/c7b4c36714a442ae5abd26de293cb5e967be6e12..1dad2ce97345f3424c4990cb232b40a35d5e936b:/scripts/tracetool/format/events_h.py diff --git a/scripts/tracetool/format/events_h.py b/scripts/tracetool/format/events_h.py index d30ccea8a1..25d913bb25 100644 --- a/scripts/tracetool/format/events_h.py +++ b/scripts/tracetool/format/events_h.py @@ -2,11 +2,11 @@ # -*- coding: utf-8 -*- """ -Generate .h for event description. +trace/generated-events.h """ __author__ = "Lluís Vilanova " -__copyright__ = "Copyright 2012, Lluís Vilanova " +__copyright__ = "Copyright 2012-2014, Lluís Vilanova " __license__ = "GPL version 2 or (at your option) any later version" __maintainer__ = "Stefan Hajnoczi" @@ -16,15 +16,14 @@ __email__ = "stefanha@linux.vnet.ibm.com" from tracetool import out -def begin(events): +def generate(events, backend): out('/* This file is autogenerated by tracetool, do not edit. */', '', '#ifndef TRACE__GENERATED_EVENTS_H', '#define TRACE__GENERATED_EVENTS_H', '', '#include ', - '' - ) + '') # event identifiers out('typedef enum {') @@ -33,8 +32,7 @@ def begin(events): out(' TRACE_%s,' % e.name.upper()) out(' TRACE_EVENT_COUNT', - '} TraceEventID;', - ) + '} TraceEventID;') # static state for e in events: @@ -46,5 +44,4 @@ def begin(events): out('#include "trace/event-internal.h"', '', - '#endif /* TRACE__GENERATED_EVENTS_H */', - ) + '#endif /* TRACE__GENERATED_EVENTS_H */')