From patchwork Wed Mar 21 21:53:23 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [v7, 10/11] trace: Provide a per-event status define for conditional compilation From: =?utf-8?q?Llu=C3=ADs_Vilanova?= X-Patchwork-Id: 148082 Message-Id: <20120321215322.3272.79042.stgit@ginnungagap.bsc.es> To: qemu-devel@nongnu.org Cc: stefanha@gmail.com, harsh@linux.vnet.ibm.com, aneesh.kumar@linux.vnet.ibm.com Date: Wed, 21 Mar 2012 22:53:23 +0100 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 5379e19..bba4c54a 100755 --- a/scripts/tracetool.py +++ b/scripts/tracetool.py @@ -48,6 +48,13 @@ def trace_h_begin(events): #include "qemu-common.h"''' 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 */' def trace_c_begin(events):