qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
To: Blue Swirl <blauwirbel@gmail.com>
Cc: qemu-devel@nongnu.org, Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Subject: [Qemu-devel] [PATCH 1/3] trace: Relax trace-events parsing regex in simpletrace.py
Date: Mon, 18 Oct 2010 13:42:54 +0100	[thread overview]
Message-ID: <1287405776-19651-2-git-send-email-stefanha@linux.vnet.ibm.com> (raw)
In-Reply-To: <AANLkTinUw8-tGxiNN2K=bz3ZZEFUZrLn=YSHGm2mUWfc@mail.gmail.com>

The regular expression to parse trace event definitions assumed the
format string would be a simple double-quoted string.  However, we now
use PRI?64 for portability which splits string literals.  The regular
expression can disregard the format string entirely since simpletrace.py
never needs to use it.

Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
---
 simpletrace.py |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/simpletrace.py b/simpletrace.py
index c2cf168..553a727 100755
--- a/simpletrace.py
+++ b/simpletrace.py
@@ -19,7 +19,7 @@ header_version  = 0
 
 trace_fmt = '=QQQQQQQQ'
 trace_len = struct.calcsize(trace_fmt)
-event_re  = re.compile(r'(disable\s+)?([a-zA-Z0-9_]+)\(([^)]*)\)\s+"([^"]*)"')
+event_re  = re.compile(r'(disable\s+)?([a-zA-Z0-9_]+)\(([^)]*)\).*')
 
 def err(msg):
     sys.stderr.write(msg + '\n')
@@ -39,7 +39,7 @@ def parse_events(fobj):
         if m is None:
             continue
 
-        disable, name, args, fmt = m.groups()
+        disable, name, args = m.groups()
         events[event_num] = (name,) + get_argnames(args)
         event_num += 1
     return events
-- 
1.7.1

  parent reply	other threads:[~2010-10-18 12:43 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-17  7:55 [Qemu-devel] [PATCH] apic: convert debug printf statements to tracepoints Blue Swirl
2010-10-18 12:42 ` [Qemu-devel] " Stefan Hajnoczi
2010-10-18 12:42 ` Stefan Hajnoczi [this message]
2010-10-20 16:49   ` [Qemu-devel] Re: [PATCH 1/3] trace: Relax trace-events parsing regex in simpletrace.py Blue Swirl
2010-10-18 12:42 ` [Qemu-devel] [PATCH 2/3] trace: Format strings must begin/end with double quotes Stefan Hajnoczi
2010-10-18 12:42 ` [Qemu-devel] [PATCH 3/3] apic: convert debug printf statements to tracepoints Stefan Hajnoczi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1287405776-19651-2-git-send-email-stefanha@linux.vnet.ibm.com \
    --to=stefanha@linux.vnet.ibm.com \
    --cc=blauwirbel@gmail.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).