diff options
Diffstat (limited to 'scripts/tracetool/format/events_h.py')
-rw-r--r-- | scripts/tracetool/format/events_h.py | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/scripts/tracetool/format/events_h.py b/scripts/tracetool/format/events_h.py index 03417de0ec..80a66c57d5 100644 --- a/scripts/tracetool/format/events_h.py +++ b/scripts/tracetool/format/events_h.py @@ -21,7 +21,13 @@ def generate(events, backend): '', '#ifndef TRACE__GENERATED_EVENTS_H', '#define TRACE__GENERATED_EVENTS_H', - '') + '', + '#include "trace/event-internal.h"', + ) + + for e in events: + out('extern TraceEvent %(event)s;', + event = e.api(e.QEMU_EVENT)) # event identifiers out('typedef enum {') @@ -58,6 +64,5 @@ def generate(events, backend): enabled=enabled) out('#define TRACE_%s_ENABLED %d' % (e.name.upper(), enabled)) - out('#include "trace/event-internal.h"', - '', + out('', '#endif /* TRACE__GENERATED_EVENTS_H */') |