summaryrefslogtreecommitdiff
path: root/scripts/tracetool/backend/simple.py
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/tracetool/backend/simple.py')
-rw-r--r--scripts/tracetool/backend/simple.py6
1 files changed, 2 insertions, 4 deletions
diff --git a/scripts/tracetool/backend/simple.py b/scripts/tracetool/backend/simple.py
index 37ef599324..3dde372e46 100644
--- a/scripts/tracetool/backend/simple.py
+++ b/scripts/tracetool/backend/simple.py
@@ -56,7 +56,7 @@ def c(events):
out('',
- ' TraceEvent *eventp = trace_event_id(%(event_id)s);',
+ ' TraceEvent *eventp = trace_event_id(%(event_enum)s);',
' bool _state = trace_event_get_state_dynamic(eventp);',
' if (!_state) {',
' return;',
@@ -65,6 +65,7 @@ def c(events):
' if (trace_record_start(&rec, %(event_id)s, %(size_str)s)) {',
' return; /* Trace Buffer Full, Event Dropped ! */',
' }',
+ event_enum = 'TRACE_' + event.name.upper(),
event_id = num,
size_str = sizestr,
)
@@ -93,9 +94,6 @@ def c(events):
def h(events):
- out('#include "trace/simple.h"',
- '')
-
for event in events:
out('void trace_%(name)s(%(args)s);',
name = event.name,