From patchwork Tue May 10 21:05:24 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Douglas Goldstein X-Patchwork-Id: 9063341 Return-Path: X-Original-To: patchwork-xen-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 1924CBF29F for ; Tue, 10 May 2016 21:08:19 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 47AA1201E4 for ; Tue, 10 May 2016 21:08:15 +0000 (UTC) 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.kernel.org (Postfix) with ESMTPS id 4495620154 for ; Tue, 10 May 2016 21:08:14 +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 1b0Eqf-0006kI-4j; Tue, 10 May 2016 21:05:45 +0000 Received: from mail6.bemta3.messagelabs.com ([195.245.230.39]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1b0Eqd-0006jt-9U for xen-devel@lists.xen.org; Tue, 10 May 2016 21:05:43 +0000 Received: from [85.158.137.68] by server-4.bemta-3.messagelabs.com id 7B/DA-03606-62D42375; Tue, 10 May 2016 21:05:42 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFlrFIsWRWlGSWpSXmKPExsVyMXThIV1VX6N wg1UzrSyWfFzM4sDocXT3b6YAxijWzLyk/IoE1owV2y8wFnwWqFg6fS1bA+Nsvi5GLg4hgQmM EucbfjCBOCwC85glZl9oYgFxJAT6WSWe3W4HynACOTESxxsmsUPY1RJnfrwGiwsJKEj8nnAIy p7EJHH8rDKIzSagIfHk1ww2EFtEQFri2ufLjCBDmQWeMUm8PtzFDJIQFrCQ2Hh1LVCCA2i1qs S7y64gYV4BB4l9k7rAwhICchIL3vuAhDkFHCUWT1nFArHKQeL85wuMExgFFjAyrGJUL04tKks t0jXRSyrKTM8oyU3MzNE1NDDWy00tLk5MT81JTCrWS87P3cQIDCsGINjB2PjF6RCjJAeTkihv j5tRuBBfUn5KZUZicUZ8UWlOavEhRhkODiUJ3q3eQDnBotT01Iq0zBxggMOkJTh4lER4BXyA0 rzFBYm5xZnpEKlTjJYcW35fW8vE8WnjHSC5beq9tUxCLHn5ealS4rycIA0CIA0ZpXlw42BReI lRVkqYlxHoQCGegtSi3MwSVPlXjOIcjErCvMdAruLJzCuB2/oK6CAmoIPk2PRBDipJREhJNTB Wpgm+PZdz8eOeLQ9mn3qhopf++qJrxxqR7uJQ8zOy2hxpPJd4XKe/dNgc+vHNE0PG3WwuvTyc 2udD3xk99Glwm/bqY+rlj6q+b1gaAr/durB3wk+LlO0vXvUfMEx/v0pvHW/n5coDMzPPNm2Of FFhVrHY8ny/UdPJZGEL4ckmVz4KOYYJZ75TYinOSDTUYi4qTgQAnRhOvb0CAAA= X-Env-Sender: cardoe@cardoe.com X-Msg-Ref: server-7.tower-31.messagelabs.com!1462914341!31914537!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 51580 invoked from network); 10 May 2016 21:05:41 -0000 Received: from mail-yw0-f194.google.com (HELO mail-yw0-f194.google.com) (209.85.161.194) by server-7.tower-31.messagelabs.com with AES128-GCM-SHA256 encrypted SMTP; 10 May 2016 21:05:41 -0000 Received: by mail-yw0-f194.google.com with SMTP id y6so2214283ywe.0 for ; Tue, 10 May 2016 14:05:41 -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=LooChJ4MWPZHEXMm4t3AknAvEFo0oaZxVRzV6smYxJk=; b=jPO7k2nBVuSEScSZn1737S7qONrWxouiUmlCx8cGeiS5XqmbEn1aHFtwgg+YgNbU4Q LMmjURP0gC4QVjEQDIbyBLn3T2i9sf9l6uqwAD0HMtsa1hY3bE35l2QjwFcS2KGLhbvF wpiTqJCvxGzyX6XBDWAGVBpXBsOA97lOcw+JM= 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=LooChJ4MWPZHEXMm4t3AknAvEFo0oaZxVRzV6smYxJk=; b=b/iRTq5VbXOtTQJTnGYC+FW38DBQsbmMo+IODSyrs3u5lUQ7wizQwKcVefusffPMrK dqjmNZUTsRBDHOgdQPBDrYY2PVaagLybFFSwEJi7oEJZhisdrU6+YOydq10CeTdHfDAq z+63+pFUICG4Jud20N5oZh9AhWP0piFSZm1QVu7+zsL7Ampuo8T341yZ5yi5WpYzxx1B rV8l1P4U+RGaTMhGYXQiM+RIdNKY+SHyL/Uho+RPyBbWwVJqDPDkJ5cfINreEGp8h5xa nmjdy7oyV4Hyd8yEypmqYMjHhl1UuM/sX8hZuij1g9vqrv+OUSxxES+d/NHgvW8kE4zs JcNw== X-Gm-Message-State: AOPr4FVOwLVTwaRAmWdXUpzsYiC+OOC7REoYce57Qp+zicbajTVKpd4kt2c9ZtK4pTboCw== X-Received: by 10.129.121.69 with SMTP id u66mr24204097ywc.237.1462914340637; Tue, 10 May 2016 14:05:40 -0700 (PDT) Received: from swanson.lan (c-68-46-196-185.hsd1.al.comcast.net. [68.46.196.185]) by smtp.gmail.com with ESMTPSA id e6sm2198740ywd.23.2016.05.10.14.05.38 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 10 May 2016 14:05:39 -0700 (PDT) From: Doug Goldstein To: xen-devel@lists.xen.org Date: Tue, 10 May 2016 16:05:24 -0500 Message-Id: <1462914329-8797-2-git-send-email-cardoe@cardoe.com> X-Mailer: git-send-email 2.7.3 In-Reply-To: <1462914329-8797-1-git-send-email-cardoe@cardoe.com> References: <1462914329-8797-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 v3 1/6] build: add debug menu 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-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_BL_SPAMCOP_NET, RCVD_IN_DNSWL_MED, T_DKIM_INVALID, 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 There are a number of debugging options for Xen so the idea is to have a menu to group them all together. Enabling this menu item will also disable NDEBUG which will result in more debug prints. This was previously wired into the 'debug=y' command line option. 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 | 11 +++++++++++ xen/Rules.mk | 2 -- xen/include/xen/config.h | 4 ++++ 4 files changed, 17 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..47dc885 --- /dev/null +++ b/xen/Kconfig.debug @@ -0,0 +1,11 @@ + +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. + +endmenu diff --git a/xen/Rules.mk b/xen/Rules.mk index 961d533..f73d86e 100644 --- a/xen/Rules.mk +++ b/xen/Rules.mk @@ -20,8 +20,6 @@ include $(XEN_ROOT)/Config.mk ifeq ($(debug),y) verbose := y frame_pointer := y -else -CFLAGS += -DNDEBUG endif ifeq ($(perfc_arrays),y) perfc := y 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__ */