|
From: | Harsh Bora |
Subject: | Re: [Qemu-devel] [PATCH 1/6] trace: [tracetool] Do not rebuild event list in backend code |
Date: | Wed, 18 Jan 2012 14:52:12 +0530 |
User-agent: | Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.10) Gecko/20100621 Fedora/3.0.5-1.fc13 Thunderbird/3.0.5 |
On 01/11/2012 11:35 PM, Lluís Vilanova wrote:
Signed-off-by: Lluís Vilanova<address@hidden> --- scripts/tracetool.py | 14 +++++++------- 1 files changed, 7 insertions(+), 7 deletions(-) diff --git a/scripts/tracetool.py b/scripts/tracetool.py index 6874f66..80e5684 100755 --- a/scripts/tracetool.py +++ b/scripts/tracetool.py
[.. snip ..]
@@ -510,14 +508,16 @@ class Event(object): # Generator that yields Event objects given a trace-events file object def read_events(fobj): + res = [] event_num = 0 for line in fobj: if not line.strip(): continue if line.lstrip().startswith('#'): continue - yield Event(event_num, line) + res.append(Event(event_num, line)) event_num += 1 + return res
Hi Lluis,This looks really nice. I can include your fixes while addressing other review comments. Shall I fold your patches with mine or do you want to keep them separate?
regards, Harsh
backend = "" output = ""
[Prev in Thread] | Current Thread | [Next in Thread] |