[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH v2 05/11] trace: [tracetool] Add support for event p
From: |
Lluís Vilanova |
Subject: |
[Qemu-devel] [PATCH v2 05/11] trace: [tracetool] Add support for event properties |
Date: |
Fri, 03 Feb 2012 22:11:49 +0100 |
User-agent: |
StGit/0.15 |
Signed-off-by: Lluís Vilanova <address@hidden>
---
scripts/tracetool.py | 8 +++++++-
1 files changed, 7 insertions(+), 1 deletions(-)
diff --git a/scripts/tracetool.py b/scripts/tracetool.py
index 94c8d7d..de867bd 100755
--- a/scripts/tracetool.py
+++ b/scripts/tracetool.py
@@ -472,7 +472,9 @@ trace_gen = {
# A trace event
import re
-cre = re.compile("(?P<name>[^(\s]+)\((?P<args>[^)]*)\)\s*(?P<fmt>\".*)?")
+cre =
re.compile("((?P<props>.*)\s+)?(?P<name>[^(\s]+)\((?P<args>[^)]*)\)\s*(?P<fmt>\".*)?")
+
+VALID_PROPS = set(["disable"])
class Event(object):
def __init__(self, line):
@@ -486,6 +488,10 @@ class Event(object):
self.argnames = get_argnames(self.args)
self.sizestr = calc_sizeofargs(self.args, self.argc)
self.fmt = groups["fmt"]
+ self.properties = groups["props"].split()
+ unknown_props = set(self.properties) - VALID_PROPS
+ if len(unknown_props) > 0:
+ raise ValueError("Unknown properties: %s" % ",
".join(unknown_props))
# Generator that yields Event objects given a trace-events file object
def read_events(fobj):
- [Qemu-devel] [PATCH v2 00/11] tracetool: Improvements for future expansion, Lluís Vilanova, 2012/02/03
- [Qemu-devel] [PATCH v2 04/11] trace: [ŧrac etool] Do not precompute the event number, Lluís Vilanova, 2012/02/03
- [Qemu-devel] [PATCH v2 05/11] trace: [tracetool] Add support for event properties,
Lluís Vilanova <=
- [Qemu-devel] [PATCH v2 06/11] trace: [tracetool] Process the "disable" event property, Lluís Vilanova, 2012/02/03
- [Qemu-devel] [PATCH v2 07/11] trace: [tracetool] Rewrite event argument parsing, Lluís Vilanova, 2012/02/03
- [Qemu-devel] [PATCH v2 08/11] trace: [tracetool] Make format-specific code optional and with access to event information, Lluís Vilanova, 2012/02/03
- [Qemu-devel] [PATCH v2 09/11] trace: [tracetool] Automatically establish available backends and formats, Lluís Vilanova, 2012/02/03
- [Qemu-devel] [PATCH v2 10/11] trace: Provide a per-event status define for conditional compilation, Lluís Vilanova, 2012/02/03
- [Qemu-devel] [PATCH v2 11/11] trace: [tracetool] Add error-reporting functions, Lluís Vilanova, 2012/02/03