qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH 02/12] trace: [tracetool, tcg] Allow TCG types in tr


From: Lluís Vilanova
Subject: [Qemu-devel] [PATCH 02/12] trace: [tracetool, tcg] Allow TCG types in trace event declarations
Date: Fri, 31 Jan 2014 17:09:14 +0100
User-agent: StGit/0.16

When found, TCG types are translated into the host native types when declaring
and defining the tracing routines not used during TCG code translation (e.g.,
"trace.h").


Signed-off-by: Lluís Vilanova <address@hidden>
---
 scripts/tracetool/__init__.py |    8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/scripts/tracetool/__init__.py b/scripts/tracetool/__init__.py
index 175df08..c76f648 100644
--- a/scripts/tracetool/__init__.py
+++ b/scripts/tracetool/__init__.py
@@ -18,6 +18,7 @@ import sys
 
 import tracetool.format
 import tracetool.backend
+import tracetool.transform
 
 
 def error_write(*lines):
@@ -122,7 +123,7 @@ class Event(object):
 
     _CRE = 
re.compile("((?P<props>.*)\s+)?(?P<name>[^(\s]+)\((?P<args>[^)]*)\)\s*(?P<fmt>\".*)?")
 
-    _VALID_PROPS = set(["disable"])
+    _VALID_PROPS = set(["disable", "tcg"])
 
     def __init__(self, name, props, fmt, args):
         """
@@ -259,6 +260,11 @@ def generate(fevents, format, backend,
 
     events = _read_events(fevents)
 
+    # transform arguments to host type by default
+    # (otherwise use event.original)
+    events = [e.transform(tracetool.transform.TCG_2_HOST(backend))
+              for e in events]
+
     if backend == "nop":
         ( e.properies.add("disable") for e in events )
 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]