From patchwork Mon Jan 9 15:46:18 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Harsh Prateek Bora X-Patchwork-Id: 135054 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [140.186.70.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 416D3B6FAA for ; Tue, 10 Jan 2012 02:47:27 +1100 (EST) Received: from localhost ([::1]:54555 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RkHRT-0000dO-SI for incoming@patchwork.ozlabs.org; Mon, 09 Jan 2012 10:47:23 -0500 Received: from eggs.gnu.org ([140.186.70.92]:57909) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RkHQk-0007QB-P7 for qemu-devel@nongnu.org; Mon, 09 Jan 2012 10:46:44 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RkHQe-0007GG-Ux for qemu-devel@nongnu.org; Mon, 09 Jan 2012 10:46:38 -0500 Received: from e28smtp05.in.ibm.com ([122.248.162.5]:48544) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RkHQd-0007Fq-Ph for qemu-devel@nongnu.org; Mon, 09 Jan 2012 10:46:32 -0500 Received: from /spool/local by e28smtp05.in.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Mon, 9 Jan 2012 21:16:26 +0530 Received: from d28relay02.in.ibm.com (9.184.220.59) by e28smtp05.in.ibm.com (192.168.1.135) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Mon, 9 Jan 2012 21:16:23 +0530 Received: from d28av03.in.ibm.com (d28av03.in.ibm.com [9.184.220.65]) by d28relay02.in.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id q09FkME52130008 for ; Mon, 9 Jan 2012 21:16:23 +0530 Received: from d28av03.in.ibm.com (loopback [127.0.0.1]) by d28av03.in.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id q09FkLFZ028304 for ; Tue, 10 Jan 2012 02:46:22 +1100 Received: from harshbora.in.ibm.com ([9.124.35.77]) by d28av03.in.ibm.com (8.14.4/8.13.1/NCO v10.0 AVin) with ESMTP id q09FkLer028273; Tue, 10 Jan 2012 02:46:21 +1100 From: Harsh Prateek Bora To: qemu-devel@nongnu.org Date: Mon, 9 Jan 2012 21:16:18 +0530 Message-Id: <1326123980-6038-3-git-send-email-harsh@linux.vnet.ibm.com> X-Mailer: git-send-email 1.7.1.1 In-Reply-To: <1326123980-6038-1-git-send-email-harsh@linux.vnet.ibm.com> References: <1326123980-6038-1-git-send-email-harsh@linux.vnet.ibm.com> x-cbid: 12010915-8256-0000-0000-000000C9CFF5 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 122.248.162.5 Cc: aneesh.kumar@linux.vnet.ibm.com, mathieu.desnoyers@efficios.com, vilanova@ac.upc.edu, stefanha@linux.vnet.ibm.com Subject: [Qemu-devel] [RFC PATCH v2 2/4] Makefile and configure changes for tracetool.py 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 Use tracetool.py to generate tracing code for requested backend. Signed-off-by: Harsh Prateek Bora --- Makefile.objs | 6 +++--- Makefile.target | 10 +++++----- configure | 4 ++-- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/Makefile.objs b/Makefile.objs index 804bc3c..984034a 100644 --- a/Makefile.objs +++ b/Makefile.objs @@ -344,12 +344,12 @@ else trace.h: trace.h-timestamp endif trace.h-timestamp: $(SRC_PATH)/trace-events $(BUILD_DIR)/config-host.mak - $(call quiet-command,sh $(SRC_PATH)/scripts/tracetool --$(TRACE_BACKEND) -h < $< > $@," GEN trace.h") + $(call quiet-command,$(PYTHON) $(SRC_PATH)/scripts/tracetool.py --backend=$(TRACE_BACKEND) -h < $< > $@," GEN trace.h") @cmp -s $@ trace.h || cp $@ trace.h trace.c: trace.c-timestamp trace.c-timestamp: $(SRC_PATH)/trace-events $(BUILD_DIR)/config-host.mak - $(call quiet-command,sh $(SRC_PATH)/scripts/tracetool --$(TRACE_BACKEND) -c < $< > $@," GEN trace.c") + $(call quiet-command,$(PYTHON) $(SRC_PATH)/scripts/tracetool.py --backend=$(TRACE_BACKEND) -c < $< > $@," GEN trace.c") @cmp -s $@ trace.c || cp $@ trace.c trace.o: trace.c $(GENERATED_HEADERS) @@ -362,7 +362,7 @@ trace-dtrace.h: trace-dtrace.dtrace # rule file. So we use '.dtrace' instead trace-dtrace.dtrace: trace-dtrace.dtrace-timestamp trace-dtrace.dtrace-timestamp: $(SRC_PATH)/trace-events $(BUILD_DIR)/config-host.mak - $(call quiet-command,sh $(SRC_PATH)/scripts/tracetool --$(TRACE_BACKEND) -d < $< > $@," GEN trace-dtrace.dtrace") + $(call quiet-command,$(PYTHON) $(SRC_PATH)/scripts/tracetool.py --backend=$(TRACE_BACKEND) -d < $< > $@," GEN trace-dtrace.dtrace") @cmp -s $@ trace-dtrace.dtrace || cp $@ trace-dtrace.dtrace trace-dtrace.o: trace-dtrace.dtrace $(GENERATED_HEADERS) diff --git a/Makefile.target b/Makefile.target index 1e90df7..07b21d1 100644 --- a/Makefile.target +++ b/Makefile.target @@ -50,11 +50,11 @@ TARGET_TYPE=system endif $(QEMU_PROG).stp: - $(call quiet-command,sh $(SRC_PATH)/scripts/tracetool \ - --$(TRACE_BACKEND) \ - --binary $(bindir)/$(QEMU_PROG) \ - --target-arch $(TARGET_ARCH) \ - --target-type $(TARGET_TYPE) \ + $(call quiet-command,$(PYTHON) $(SRC_PATH)/scripts/tracetool.py \ + --backend=$(TRACE_BACKEND) \ + --binary=$(bindir)/$(QEMU_PROG) \ + --target-arch=$(TARGET_ARCH) \ + --target-type=$(TARGET_TYPE) \ --stap < $(SRC_PATH)/trace-events > $(QEMU_PROG).stp," GEN $(QEMU_PROG).stp") else stap: diff --git a/configure b/configure index 19e8394..0ea8634 100755 --- a/configure +++ b/configure @@ -1040,7 +1040,7 @@ echo " --disable-docs disable documentation build" echo " --disable-vhost-net disable vhost-net acceleration support" echo " --enable-vhost-net enable vhost-net acceleration support" echo " --enable-trace-backend=B Set trace backend" -echo " Available backends:" $("$source_path"/scripts/tracetool --list-backends) +echo " Available backends:" $("$source_path"/scripts/tracetool.py --list-backends) echo " --with-trace-file=NAME Full PATH,NAME of file to store traces" echo " Default:trace-" echo " --disable-spice disable spice" @@ -2477,7 +2477,7 @@ fi ########################################## # check if trace backend exists -sh "$source_path/scripts/tracetool" "--$trace_backend" --check-backend > /dev/null 2> /dev/null +$python "$source_path/scripts/tracetool.py" "--backend=$trace_backend" --check-backend > /dev/null 2> /dev/null if test "$?" -ne 0 ; then echo echo "Error: invalid trace backend"