2
0

h.py 913 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. #!/usr/bin/env python
  2. # -*- coding: utf-8 -*-
  3. """
  4. Generate .h file.
  5. """
  6. __author__ = "Lluís Vilanova <vilanova@ac.upc.edu>"
  7. __copyright__ = "Copyright 2012-2014, Lluís Vilanova <vilanova@ac.upc.edu>"
  8. __license__ = "GPL version 2 or (at your option) any later version"
  9. __maintainer__ = "Stefan Hajnoczi"
  10. __email__ = "stefanha@linux.vnet.ibm.com"
  11. from tracetool import out
  12. def begin(events):
  13. out('/* This file is autogenerated by tracetool, do not edit. */',
  14. '',
  15. '#ifndef TRACE__GENERATED_TRACERS_H',
  16. '#define TRACE__GENERATED_TRACERS_H',
  17. '',
  18. '#include "qemu-common.h"')
  19. def end(events):
  20. out('#endif /* TRACE__GENERATED_TRACERS_H */')
  21. def nop(events):
  22. for e in events:
  23. out('',
  24. 'static inline void %(api)s(%(args)s)',
  25. '{',
  26. '}',
  27. api = e.api(),
  28. args = e.args,
  29. )