trace: [tracetool] Add method 'Event.api' to build event names

Makes it easier to ensure proper naming across the different frontends and backends.

Signed-off-by: Lluís Vilanova <vilanova@ac.upc.edu>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
This commit is contained in:
Lluís Vilanova 2014-02-23 20:37:02 +01:00 committed by Stefan Hajnoczi
parent 9898370497
commit 7d08f0da90
6 changed files with 27 additions and 17 deletions

View file

@ -6,7 +6,7 @@ Generate .h file.
"""
__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"
__maintainer__ = "Stefan Hajnoczi"
@ -30,9 +30,9 @@ def end(events):
def nop(events):
for e in events:
out('',
'static inline void trace_%(name)s(%(args)s)',
'static inline void %(api)s(%(args)s)',
'{',
'}',
name = e.name,
api = e.api(),
args = e.args,
)