From patchwork Wed Feb 10 12:42:34 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ian Campbell X-Patchwork-Id: 8270841 Return-Path: X-Original-To: patchwork-xen-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id C6D299F6DA for ; Wed, 10 Feb 2016 12:45:37 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id D784C2037F for ; Wed, 10 Feb 2016 12:45:36 +0000 (UTC) Received: from lists.xen.org (lists.xenproject.org [50.57.142.19]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id EB8A52037C for ; Wed, 10 Feb 2016 12:45:35 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=lists.xen.org) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1aTU6n-0005sG-Al; Wed, 10 Feb 2016 12:43:01 +0000 Received: from mail6.bemta14.messagelabs.com ([193.109.254.103]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1aTU6l-0005s6-Ha for xen-devel@lists.xen.org; Wed, 10 Feb 2016 12:42:59 +0000 Received: from [193.109.254.147] by server-12.bemta-14.messagelabs.com id 69/DE-09834-2503BB65; Wed, 10 Feb 2016 12:42:58 +0000 X-Env-Sender: prvs=841e7c5e8=Ian.Campbell@citrix.com X-Msg-Ref: server-16.tower-27.messagelabs.com!1455108176!22745698!1 X-Originating-IP: [66.165.176.63] X-SpamReason: No, hits=0.0 required=7.0 tests=sa_preprocessor: VHJ1c3RlZCBJUDogNjYuMTY1LjE3Ni42MyA9PiAzMDYwNDg=\n, received_headers: No Received headers X-StarScan-Received: X-StarScan-Version: 7.35.1; banners=-,-,- X-VirusChecked: Checked Received: (qmail 5097 invoked from network); 10 Feb 2016 12:42:57 -0000 Received: from smtp02.citrix.com (HELO SMTP02.CITRIX.COM) (66.165.176.63) by server-16.tower-27.messagelabs.com with RC4-SHA encrypted SMTP; 10 Feb 2016 12:42:57 -0000 X-IronPort-AV: E=Sophos;i="5.22,425,1449532800"; d="scan'208";a="337255065" From: Ian Campbell To: , , , Date: Wed, 10 Feb 2016 12:42:34 +0000 Message-ID: <1455108154-12084-1-git-send-email-ian.campbell@citrix.com> X-Mailer: git-send-email 2.1.4 MIME-Version: 1.0 X-DLP: MIA1 Cc: Anthony PERARD , Paul Durrant , Ian Campbell Subject: [Xen-devel] [PATCH] tools: probe for existence of qemu-xen trace backends. X-BeenThere: xen-devel@lists.xen.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP QEMU upstream commit ed7f5f1d8db0 ("trace: convert stderr backend to log") renamed the stderr trace backend to log, which breaks the xen build when pointed at a QEMU tree after that point: ./configure of QEMU fail with: "ERROR: invalid trace backends Please choose supported trace backends." These changes are not (yet) present in qemu-xen-unstable.git and in any case we want to support QEMU before and after this change. Use the tracetool.py provided by QEMU to probe for supported trace backends. This is now done unconditionally (not depending on debug=y), which is simpler to arrange here but also follows upstream QEMU which in baf86d6b3ca0 ("trace: switch default backend to "log"") switched the default from "nop" to "log", so we would have got log in debug=no builds from then on anyway. Tested with current qemu-xen-unstable (f165e581d9a6) and current QEMU upstream master (f075c89f0a9c), the latter picked up via: QEMU_UPSTREAM_URL := /path/to/qemu-xen.git which therefore tested the out of tree build aspect of this change. Signed-off-by: Ian Campbell Cc: Paul Durrant Cc: Anthony PERARD --- tools/Makefile | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/tools/Makefile b/tools/Makefile index 5688a7c..76a2235 100644 --- a/tools/Makefile +++ b/tools/Makefile @@ -228,7 +228,7 @@ qemu-xen-dir-force-update: qemu-xen-dir-find fi ifeq ($(debug),y) -QEMU_XEN_ENABLE_DEBUG := --enable-debug --enable-trace-backend=stderr +QEMU_XEN_ENABLE_DEBUG := --enable-debug else QEMU_XEN_ENABLE_DEBUG := endif @@ -240,8 +240,16 @@ subdir-all-qemu-xen-dir: qemu-xen-dir-find source=.; \ fi; \ cd qemu-xen-dir; \ + if $$source/scripts/tracetool.py --check-backends --backends log ; then \ + enable_trace_backend='--enable-trace-backend=log'; \ + elif $$source/scripts/tracetool.py --check-backends --backends stderr ; then \ + enable_trace_backend='--enable-trace-backend=stderr'; \ + else \ + enable_trace_backend='' ; \ + fi ; \ $$source/configure --enable-xen --target-list=i386-softmmu \ $(QEMU_XEN_ENABLE_DEBUG) \ + $$enable_trace_backend \ --prefix=$(LIBEXEC) \ --libdir=$(LIBEXEC_LIB) \ --includedir=$(LIBEXEC_INC) \