]> git.proxmox.com Git - mirror_qemu.git/blobdiff - scripts/tracetool/format/tcg_h.py
trace: fix tcg tracing build breakage
[mirror_qemu.git] / scripts / tracetool / format / tcg_h.py
index e2331f251ded6eca594ceb8617247461e8d410ee..db55f52eb52f86b378f67023c357eb7a6969dfe1 100644 (file)
@@ -27,15 +27,20 @@ def vcpu_transform_args(args):
     ])
 
 
-def generate(events, backend):
+def generate(events, backend, group):
+    if group == "root":
+        header = "trace-root.h"
+    else:
+        header = "trace.h"
+
     out('/* This file is autogenerated by tracetool, do not edit. */',
         '/* You must include this file after the inclusion of helper.h */',
         '',
-        '#ifndef TRACE__GENERATED_TCG_TRACERS_H',
-        '#define TRACE__GENERATED_TCG_TRACERS_H',
+        '#ifndef TRACE_%s_GENERATED_TCG_TRACERS_H' % group.upper(),
+        '#define TRACE_%s_GENERATED_TCG_TRACERS_H' % group.upper(),
         '',
-        '#include "trace.h"',
         '#include "exec/helper-proto.h"',
+        '#include "%s"' % header,
         '',
         )
 
@@ -63,4 +68,4 @@ def generate(events, backend):
         out('}')
 
     out('',
-        '#endif /* TRACE__GENERATED_TCG_TRACERS_H */')
+        '#endif /* TRACE_%s_GENERATED_TCG_TRACERS_H */' % group.upper())