From patchwork Sun May 22 05:01:30 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Douglas Goldstein X-Patchwork-Id: 9130717 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 52D2D60761 for ; Sun, 22 May 2016 05:04:24 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E871228160 for ; Sun, 22 May 2016 05:04:23 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id DD5A828195; Sun, 22 May 2016 05:04:23 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.1 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 01AC928160 for ; Sun, 22 May 2016 05:04:16 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1b4LWU-0005bd-EZ; Sun, 22 May 2016 05:01:54 +0000 Received: from mail6.bemta14.messagelabs.com ([193.109.254.103]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1b4LWS-0005bJ-Sl for xen-devel@lists.xen.org; Sun, 22 May 2016 05:01:52 +0000 Received: from [193.109.254.147] by server-4.bemta-14.messagelabs.com id EA/09-03277-04D31475; Sun, 22 May 2016 05:01:52 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFlrFIsWRWlGSWpSXmKPExsVyMXThIV17W8d wg8Z+dYslHxezODB6HN39mymAMYo1My8pvyKBNaNzTSdjwS+hita5NQ2M3/m7GLk4hAQmMErc eDuREcRhEZjHLHH26Qo2EEdCoJ9VYnLnLKYuRk4gJ0bi0ZsuNgi7QqLtfj8jiC0koCDxe8IhJ ohR85gk3i64DlbEJqAh8eTXDDBbREBa4trny2ArmAWeMUm8PtzF3MXIwSEsYC6x4FsQSA2LgK rEttdTwIbyCjhI7Lt4jQWkREJATmLBex8Qk1PAUeLCd22ItQ4SDesWskxgFFjAyLCKUaM4tag stUjX0EwvqSgzPaMkNzEzR9fQ0EQvN7W4ODE9NScxqVgvOT93EyMwrOoZGBh3MH497XmIUZKD SUmUN7XbPlyILyk/pTIjsTgjvqg0J7X4EKMMB4eSBO9ea8dwIcGi1PTUirTMHGCAw6QlOHiUR HhXgaR5iwsSc4sz0yFSpxgtObb8vraWiePTxjtActvUe2uZhFjy8vNSpcR554E0CIA0ZJTmwY 2DReElRlkpYV5GBgYGIZ6C1KLczBJU+VeM4hyMSsK8M0Gm8GTmlcBtfQV0EBPQQQ+lHUAOKkl ESEk1MGou2bAwnmHxjCtxe9pfbey9xyQuJ6N9Kyc3yjez1ruv9sijBct/Z8gpzm4ti1TbZz/z rf+uMMPj8Ts2CYVUGJ6RtYjWb9/ie/EYA7PGg/9RCyWF2oIXW/ewRc9geONc7Wt+mNearS/5V sP98FOLtFo9VhpO812s9+OWLK8Wd9G6I01xh5LSlFiKMxINtZiLihMBT1stLb0CAAA= X-Env-Sender: cardoe@cardoe.com X-Msg-Ref: server-13.tower-27.messagelabs.com!1463893310!43081751!1 X-Originating-IP: [209.85.161.194] X-SpamReason: No, hits=0.5 required=7.0 tests=BODY_RANDOM_LONG X-StarScan-Received: X-StarScan-Version: 8.34; banners=-,-,- X-VirusChecked: Checked Received: (qmail 59825 invoked from network); 22 May 2016 05:01:51 -0000 Received: from mail-yw0-f194.google.com (HELO mail-yw0-f194.google.com) (209.85.161.194) by server-13.tower-27.messagelabs.com with AES128-GCM-SHA256 encrypted SMTP; 22 May 2016 05:01:51 -0000 Received: by mail-yw0-f194.google.com with SMTP id j74so887229ywg.1 for ; Sat, 21 May 2016 22:01:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cardoe.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=Cu/yiq1/+zeqpmgrDKH8U2bc1Q7p8WId+rvj48DCZ7s=; b=gEXjijR5xuRnNmZOXy3WkUmMCTn0xWXjhNl8P5A9iQ2wLSfJ2xdiqJ1p8RJlVSVZQ1 vonom485WArvpb4PStlWTiW3qpboOJybVRCmTg0RBmad+YkC45w8QsRtXDlZhVE94bl1 LVdhMlydmkx34/kUmL7k4q1vNzLJ+5wKby8iA= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=Cu/yiq1/+zeqpmgrDKH8U2bc1Q7p8WId+rvj48DCZ7s=; b=jAC41d3daV0vYOzr+M1nKtamFoqPLo50KT+MoyUxDD5hDc5LKV4/FCeCwsbwvj+gWE ocwh5zic2ygFqFNI379myoNNEi0a2iIBypK1IBpqUas3MGBAzjluYf6xu6xVzS5RqsUr o4Gbw66+UO/M0y0W1OueVBgH+XpV9vf280U5i3/d7l6VWJEZoLRfE+dgrMZ2UpPRZgvL sHdfQjW3rLuOxJQ7RimqVFMkTSxeyqw64rHilbCInGjgFlTE9KU7/lbRwSfGD3PnRKfg m7S+FJi0gIt+sBLSPY0n1/Rt5vQhT2bajXjZeWnJj5j0+h8FO2j1mWZvDlZaQiVhtRTM WzYQ== X-Gm-Message-State: AOPr4FWiGGHsDgdBtgXOFVJrypAKcF02kGJMlCycUehdhA0xPpu1cefRF1iZpgLknCNOPQ== X-Received: by 10.13.230.66 with SMTP id p63mr6149016ywe.93.1463893310056; Sat, 21 May 2016 22:01:50 -0700 (PDT) Received: from localhost.localdomain (c-68-46-196-185.hsd1.al.comcast.net. [68.46.196.185]) by smtp.gmail.com with ESMTPSA id z20sm15961686ywd.44.2016.05.21.22.01.48 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sat, 21 May 2016 22:01:48 -0700 (PDT) From: Doug Goldstein To: xen-devel@lists.xen.org Date: Sun, 22 May 2016 00:01:30 -0500 Message-Id: <1463893295-2610-2-git-send-email-cardoe@cardoe.com> X-Mailer: git-send-email 2.7.3 In-Reply-To: <1463893295-2610-1-git-send-email-cardoe@cardoe.com> References: <1463893295-2610-1-git-send-email-cardoe@cardoe.com> Cc: Stefano Stabellini , Wei Liu , George Dunlap , Andrew Cooper , Doug Goldstein , Tim Deegan , Jan Beulich , Ian Jackson Subject: [Xen-devel] [PATCH v4 1/6] build: convert debug to Kconfig X-BeenThere: xen-devel@lists.xen.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: xen-devel-bounces@lists.xen.org Sender: "Xen-devel" X-Virus-Scanned: ClamAV using ClamSMTP Enabling debug will disable NDEBUG which will result in more debug prints. There are a number of debugging options for Xen so place the debug option under a menu for different debugging options to have a way to group them all together. Signed-off-by: Doug Goldstein --- CC: Andrew Cooper CC: George Dunlap CC: Ian Jackson CC: Jan Beulich CC: Konrad Rzeszutek Wilk CC: Stefano Stabellini CC: Tim Deegan CC: Wei Liu --- xen/Kconfig | 2 ++ xen/Kconfig.debug | 13 +++++++++++++ xen/Rules.mk | 5 +++-- xen/include/xen/config.h | 4 ++++ 4 files changed, 22 insertions(+), 2 deletions(-) create mode 100644 xen/Kconfig.debug diff --git a/xen/Kconfig b/xen/Kconfig index fa8b27c..0fe7a1a 100644 --- a/xen/Kconfig +++ b/xen/Kconfig @@ -26,3 +26,5 @@ config DEFCONFIG_LIST config EXPERT string option env="XEN_CONFIG_EXPERT" + +source "Kconfig.debug" diff --git a/xen/Kconfig.debug b/xen/Kconfig.debug new file mode 100644 index 0000000..b446027 --- /dev/null +++ b/xen/Kconfig.debug @@ -0,0 +1,13 @@ + +menu "Debugging Options" + +config DEBUG + bool "Developer Checks" + ---help--- + Enables developer checks such as asserts and extra printks, this + option is intended for development purposes only, and not for + production use. + + You probably want to say 'N' here. + +endmenu diff --git a/xen/Rules.mk b/xen/Rules.mk index 961d533..86c1e0d 100644 --- a/xen/Rules.mk +++ b/xen/Rules.mk @@ -20,13 +20,14 @@ include $(XEN_ROOT)/Config.mk ifeq ($(debug),y) verbose := y frame_pointer := y -else -CFLAGS += -DNDEBUG endif ifeq ($(perfc_arrays),y) perfc := y endif +ifeq ($(origin debug),command line) +$(error "You must use 'make menuconfig' to enable/disable debug now.") +endif ifneq ($(origin kexec),undefined) $(error "You must use 'make menuconfig' to enable/disable kexec now.") endif diff --git a/xen/include/xen/config.h b/xen/include/xen/config.h index ef6e5ee..473c5e8 100644 --- a/xen/include/xen/config.h +++ b/xen/include/xen/config.h @@ -81,4 +81,8 @@ /* allow existing code to work with Kconfig variable */ #define NR_CPUS CONFIG_NR_CPUS +#ifndef CONFIG_DEBUG +#define NDEBUG +#endif + #endif /* __XEN_CONFIG_H__ */