]> Git Repo - qemu.git/blobdiff - scripts/tracetool/format/events_h.py
trace: [tracetool] Minimize the amount of per-backend code
[qemu.git] / scripts / tracetool / format / events_h.py
index d30ccea8a137adb4dfe3978fffcd3da5fe50f0dc..25d913bb25f3474b2c9a412d0e26abb282ea5526 100644 (file)
@@ -2,11 +2,11 @@
 # -*- coding: utf-8 -*-
 
 """
-Generate .h for event description.
+trace/generated-events.h
 """
 
 __author__     = "Lluís Vilanova <[email protected]>"
-__copyright__  = "Copyright 2012, Lluís Vilanova <[email protected]>"
+__copyright__  = "Copyright 2012-2014, Lluís Vilanova <[email protected]>"
 __license__    = "GPL version 2 or (at your option) any later version"
 
 __maintainer__ = "Stefan Hajnoczi"
@@ -16,15 +16,14 @@ __email__      = "[email protected]"
 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 <stdbool.h>',
-        ''
-        )
+        '')
 
     # 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 */')
This page took 0.025299 seconds and 4 git commands to generate.