From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:53852) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SWrYp-0001AU-PW for qemu-devel@nongnu.org; Tue, 22 May 2012 12:03:53 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SWrYi-0005Qs-GZ for qemu-devel@nongnu.org; Tue, 22 May 2012 12:03:47 -0400 Received: from e06smtp17.uk.ibm.com ([195.75.94.113]:37261) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SWrYi-0005PK-8F for qemu-devel@nongnu.org; Tue, 22 May 2012 12:03:40 -0400 Received: from /spool/local by e06smtp17.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Tue, 22 May 2012 17:03:35 +0100 Received: from d06av02.portsmouth.uk.ibm.com (d06av02.portsmouth.uk.ibm.com [9.149.37.228]) by d06nrmr1507.portsmouth.uk.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id q4MG36Rg2445362 for ; Tue, 22 May 2012 17:03:06 +0100 Received: from d06av02.portsmouth.uk.ibm.com (loopback [127.0.0.1]) by d06av02.portsmouth.uk.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id q4MG35vU015389 for ; Tue, 22 May 2012 10:03:05 -0600 From: Stefan Hajnoczi Date: Tue, 22 May 2012 17:03:01 +0100 Message-Id: <1337702582-26368-2-git-send-email-stefanha@linux.vnet.ibm.com> In-Reply-To: <1337702582-26368-1-git-send-email-stefanha@linux.vnet.ibm.com> References: <1337702582-26368-1-git-send-email-stefanha@linux.vnet.ibm.com> Subject: [Qemu-devel] [PATCH 1.1 1/2] simpletrace: skip disabled trace event numbering List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: =?UTF-8?q?Llu=C3=ADs=20Vilanova?= , Stefan Hajnoczi The simple trace code generator has been rewritten for QEMU 1.1 and now assigns event numbers only to enabled events. This means we must skip disabled events when pretty-printing traces in simpletrace.py. Note this means old binary traces may be pretty printed incorrectly since they use a different event numbering when the "disable" keyword is present in ./trace-events. It's unfortunate but not easy to avoid at this stage. Always use the simpletrace.py that came with the QEMU binary to ensure correctly pretty-printing. Reported-by: Juan Quintela Signed-off-by: Stefan Hajnoczi --- scripts/simpletrace.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/scripts/simpletrace.py b/scripts/simpletrace.py index f55e5e6..db39b02 100755 --- a/scripts/simpletrace.py +++ b/scripts/simpletrace.py @@ -37,8 +37,9 @@ def parse_events(fobj): continue disable, name, args = m.groups() - events[event_num] = (name,) + get_argnames(args) - event_num += 1 + if not disable: + events[event_num] = (name,) + get_argnames(args) + event_num += 1 return events def read_record(fobj): -- 1.7.10