[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v2] trace: tighten up trace-events regex to fix
From: |
Stefan Hajnoczi |
Subject: |
Re: [Qemu-devel] [PATCH v2] trace: tighten up trace-events regex to fix bad parse |
Date: |
Wed, 24 Sep 2014 14:39:14 +0100 |
User-agent: |
Mutt/1.5.23 (2014-03-12) |
On Tue, Sep 23, 2014 at 11:37:06AM +0100, Stefan Hajnoczi wrote:
> Use \w for properties and trace event names since they are both drawn
> from [a-zA-Z0-9_] character sets.
>
> The .* for matching properties was too aggressive and caused the
> following failure with foo(int rc) "(this is a test)":
>
> Traceback (most recent call last):
> File "scripts/tracetool.py", line 139, in <module>
> main(sys.argv)
> File "scripts/tracetool.py", line 134, in main
> binary=binary, probe_prefix=probe_prefix)
> File "scripts/tracetool/__init__.py", line 334, in generate
> events = _read_events(fevents)
> File "scripts/tracetool/__init__.py", line 262, in _read_events
> res.append(Event.build(line))
> File "scripts/tracetool/__init__.py", line 225, in build
> return Event(name, props, fmt, args, arg_fmts)
> File "scripts/tracetool/__init__.py", line 185, in __init__
> % ", ".join(unknown_props))
> ValueError: Unknown properties: foo(int, rc)
>
> Cc: Lluís Vilanova <address@hidden>
> Reported-by: Eric Auger <address@hidden>
> Signed-off-by: Stefan Hajnoczi <address@hidden>
> ---
> v2:
> * Fix regex to allow multiple properties [Lluís]
>
> scripts/tracetool/__init__.py | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
Applied to my tracing tree:
https://github.com/stefanha/qemu/commits/tracing
Stefan
pgpEGBdff1gYm.pgp
Description: PGP signature