From patchwork Tue Mar 13 20:03:38 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Llu=C3=ADs_Vilanova?= X-Patchwork-Id: 146493 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 2F87DB6EEE for ; Wed, 14 Mar 2012 08:12:14 +1100 (EST) Received: from localhost ([::1]:33797 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S7XxE-0004AJ-Mt for incoming@patchwork.ozlabs.org; Tue, 13 Mar 2012 16:04:20 -0400 Received: from eggs.gnu.org ([208.118.235.92]:38729) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S7Xwm-0003is-Of for qemu-devel@nongnu.org; Tue, 13 Mar 2012 16:03:58 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1S7Xwg-000843-Es for qemu-devel@nongnu.org; Tue, 13 Mar 2012 16:03:52 -0400 Received: from roura.ac.upc.es ([147.83.33.10]:38927) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S7Xwg-00083k-4A for qemu-devel@nongnu.org; Tue, 13 Mar 2012 16:03:46 -0400 Received: from gw.ac.upc.edu (gw.ac.upc.es [147.83.30.3]) by roura.ac.upc.es (8.13.8/8.13.8) with ESMTP id q2DK3eLG023421; Tue, 13 Mar 2012 21:03:40 +0100 Received: from localhost (unknown [84.88.53.92]) by gw.ac.upc.edu (Postfix) with ESMTP id 525BA2D0018; Tue, 13 Mar 2012 21:03:39 +0100 (CET) From: =?utf-8?b?TGx1w61z?= Vilanova To: qemu-devel@nongnu.org Date: Tue, 13 Mar 2012 21:03:38 +0100 Message-Id: <20120313200338.24179.53393.stgit@ginnungagap.bsc.es> X-Mailer: git-send-email 1.7.9.1 In-Reply-To: <20120313200235.24179.63987.stgit@ginnungagap.bsc.es> References: <20120313200235.24179.63987.stgit@ginnungagap.bsc.es> User-Agent: StGit/0.16 MIME-Version: 1.0 X-MIME-Autoconverted: from 8bit to quoted-printable by roura.ac.upc.es id q2DK3eLG023421 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 147.83.33.10 Cc: stefanha@gmail.com, harsh@linux.vnet.ibm.com, aneesh.kumar@linux.vnet.ibm.com Subject: [Qemu-devel] [PATCH 11/12] trace: Provide a per-event status define for conditional compilation X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Revives the functionality introduced by commit b7d66a76, which was temporarily removed on the tracetool conversion performed during this series. Signed-off-by: LluĂ­s Vilanova Signed-off-by: Harsh Prateek Bora --- scripts/tracetool.py | 7 +++++++ 1 files changed, 7 insertions(+), 0 deletions(-) diff --git a/scripts/tracetool.py b/scripts/tracetool.py index 6ef4374..0f76b50 100755 --- a/scripts/tracetool.py +++ b/scripts/tracetool.py @@ -123,6 +123,13 @@ def trace_h_begin(events): @for_format("h", END) def trace_h_end(events): + for e in events: + if 'disable' in e.properties: + enabled = 0 + else: + enabled = 1 + print "#define TRACE_%s_ENABLED %d" % (e.name.upper(), enabled) + print print '#endif /* TRACE_H */'