ust_events_c.py 945 B

123456789101112131415161718192021222324252627282930313233
  1. #!/usr/bin/env python
  2. # -*- coding: utf-8 -*-
  3. """
  4. trace/generated-ust.c
  5. """
  6. __author__ = "Mohamad Gebai <mohamad.gebai@polymtl.ca>"
  7. __copyright__ = "Copyright 2012, Mohamad Gebai <mohamad.gebai@polymtl.ca>"
  8. __license__ = "GPL version 2 or (at your option) any later version"
  9. __maintainer__ = "Stefan Hajnoczi"
  10. __email__ = "stefanha@redhat.com"
  11. from tracetool import out
  12. def generate(events, backend):
  13. events = [e for e in events
  14. if "disabled" not in e.properties]
  15. out('/* This file is autogenerated by tracetool, do not edit. */',
  16. '',
  17. '#define TRACEPOINT_DEFINE',
  18. '#define TRACEPOINT_CREATE_PROBES',
  19. '',
  20. '/* If gcc version 4.7 or older is used, LTTng ust gives a warning when compiling with',
  21. ' -Wredundant-decls.',
  22. ' */',
  23. '#pragma GCC diagnostic ignored "-Wredundant-decls"',
  24. '',
  25. '#include "generated-ust-provider.h"')