|
@@ -6,7 +6,7 @@
|
|
"""
|
|
"""
|
|
|
|
|
|
__author__ = "Lluís Vilanova <vilanova@ac.upc.edu>"
|
|
__author__ = "Lluís Vilanova <vilanova@ac.upc.edu>"
|
|
-__copyright__ = "Copyright 2012, Lluís Vilanova <vilanova@ac.upc.edu>"
|
|
|
|
|
|
+__copyright__ = "Copyright 2012-2014, Lluís Vilanova <vilanova@ac.upc.edu>"
|
|
__license__ = "GPL version 2 or (at your option) any later version"
|
|
__license__ = "GPL version 2 or (at your option) any later version"
|
|
|
|
|
|
__maintainer__ = "Stefan Hajnoczi"
|
|
__maintainer__ = "Stefan Hajnoczi"
|
|
@@ -33,13 +33,14 @@ def h(events):
|
|
if len(e.args) > 0:
|
|
if len(e.args) > 0:
|
|
argnames = ", " + argnames
|
|
argnames = ", " + argnames
|
|
|
|
|
|
- out('static inline void trace_%(name)s(%(args)s)',
|
|
|
|
|
|
+ out('static inline void %(api)s(%(args)s)',
|
|
'{',
|
|
'{',
|
|
' bool _state = trace_event_get_state(%(event_id)s);',
|
|
' bool _state = trace_event_get_state(%(event_id)s);',
|
|
' if (_state) {',
|
|
' if (_state) {',
|
|
' fprintf(stderr, "%(name)s " %(fmt)s "\\n" %(argnames)s);',
|
|
' fprintf(stderr, "%(name)s " %(fmt)s "\\n" %(argnames)s);',
|
|
' }',
|
|
' }',
|
|
'}',
|
|
'}',
|
|
|
|
+ api = e.api(),
|
|
name = e.name,
|
|
name = e.name,
|
|
args = e.args,
|
|
args = e.args,
|
|
event_id = "TRACE_" + e.name.upper(),
|
|
event_id = "TRACE_" + e.name.upper(),
|