])
-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,
'',
)
out('}')
out('',
- '#endif /* TRACE__GENERATED_TCG_TRACERS_H */')
+ '#endif /* TRACE_%s_GENERATED_TCG_TRACERS_H */' % group.upper())