PPC: Fix rldcl
[qemu/agraf.git] / scripts / tracetool / format / h.py
blob93132fceafe21f6fb8b6e35d65f8917e6ec97971
1 #!/usr/bin/env python
2 # -*- coding: utf-8 -*-
4 """
5 Generate .h file.
6 """
8 __author__ = "Lluís Vilanova <vilanova@ac.upc.edu>"
9 __copyright__ = "Copyright 2012, Lluís Vilanova <vilanova@ac.upc.edu>"
10 __license__ = "GPL version 2 or (at your option) any later version"
12 __maintainer__ = "Stefan Hajnoczi"
13 __email__ = "stefanha@linux.vnet.ibm.com"
16 from tracetool import out
19 def begin(events):
20 out('/* This file is autogenerated by tracetool, do not edit. */',
21 '',
22 '#ifndef TRACE__GENERATED_TRACERS_H',
23 '#define TRACE__GENERATED_TRACERS_H',
24 '',
25 '#include "qemu-common.h"')
27 def end(events):
28 out('#endif /* TRACE__GENERATED_TRACERS_H */')
30 def nop(events):
31 for e in events:
32 out('',
33 'static inline void trace_%(name)s(%(args)s)',
34 '{',
35 '}',
36 name = e.name,
37 args = e.args,