Received: by 10.192.165.148 with SMTP id m20csp418889imm; Wed, 2 May 2018 02:35:43 -0700 (PDT) X-Google-Smtp-Source: AB8JxZpeWaV+hdudt+xmwhtwG9YX3g8RcbeTWOx8GtOgFVP4bOZBqmSgUXZxsLGXP9bUT6K3MqLf X-Received: by 2002:a63:7d47:: with SMTP id m7-v6mr8939052pgn.443.1525253743714; Wed, 02 May 2018 02:35:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1525253743; cv=none; d=google.com; s=arc-20160816; b=fM5DYDwL7IHUacfwFfhoUs8yMdNty7oHm/TdKVoCrd/6z0o+l78AML6yoEKR65GzOY 6bzApWLlEYzvopSG1UagHKEoP5JzJN8RkoVW6aIn6nIOhIB6ldj+lrDzZz1kH6yqjGEo 51Kt/qlTUK1BCw4mt+SB7Hglev/dG3jT8/5+LbV3f0OAPFhPAQQmY1r7LBwQHyGtaDWP iN12eOJr7WMtYsKo/t2QgCq9I/fkJ/YwREG1HJlqbCmxMym6MK96SYC+wxI7g0Rysdub Uw4bifgkODw42HCcxalOs46GUvmqERJbJEW2eBSj6GZdn25Sy4mIg52MHRTNJQXe5E/O zR3w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:arc-authentication-results; bh=Fh4J0X1kGd18hpLuuth54q/tpr5LZVjL8HIwOqZlqOE=; b=nUTfg5Mm6cC6OqsK1Z0pI93Yb+vUw63rap8dYgksP1DRckyMWfljRdGsQWbeKJ58wQ NZHX4mKLjuclXKc18G+Kj5NzJRDLfzDR1iG3xgozF78zLIbdGYFMwG2Yes0fx08+Tp/D KXhfwK0l7siQlgGhTWg57iWpF+6UW9VmFTbiNg87tIeEmKh/gbeic3etLp2p7RJkQZr8 KCxfQzg25hA8fctN7Yv1lgpSeWv0OxXloaUrRHWvYeCXmgU3Ij5kBPCIkyCgb/3B/u8d B/3y/m3btKfRWMZVKglbf+Vl5STapd1EVrgrMim4560xpVSy4YP2LNBqwBbNtBI8gm89 qz2A== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i9-v6si9208589pgc.370.2018.05.02.02.35.29; Wed, 02 May 2018 02:35:43 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751372AbeEBJfA (ORCPT + 99 others); Wed, 2 May 2018 05:35:00 -0400 Received: from mga07.intel.com ([134.134.136.100]:16513 "EHLO mga07.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750883AbeEBJe6 (ORCPT ); Wed, 2 May 2018 05:34:58 -0400 X-Amp-Result: UNSCANNABLE X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga105.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 02 May 2018 02:34:57 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.49,354,1520924400"; d="scan'208";a="220974886" Received: from gvt-dell.bj.intel.com (HELO intel.com) ([10.238.154.59]) by orsmga005.jf.intel.com with SMTP; 02 May 2018 02:34:54 -0700 Date: Wed, 2 May 2018 17:24:58 +0800 From: "Du, Changbin" To: Randy Dunlap Cc: changbin.du@intel.com, yamada.masahiro@socionext.com, michal.lkml@markovi.net, tglx@linutronix.de, mingo@redhat.com, akpm@linux-foundation.org, x86@kernel.org, lgirdwood@gmail.com, broonie@kernel.org, arnd@arndb.de, linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arch@vger.kernel.org Subject: Re: [PATCH 4/5] kernel hacking: new config DEBUG_EXPERIENCE to apply GCC -Og optimization Message-ID: <20180502092458.zss44oqy7fqsyszp@intel.com> References: <1525179614-14571-1-git-send-email-changbin.du@intel.com> <1525179614-14571-5-git-send-email-changbin.du@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: NeoMutt/20180323-6-5ca392 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, May 01, 2018 at 08:25:27AM -0700, Randy Dunlap wrote: > Good morning. > > On 05/01/2018 06:00 AM, changbin.du@intel.com wrote: > > From: Changbin Du > > > > > > Signed-off-by: Changbin Du > > --- > > Makefile | 4 ++++ > > include/linux/compiler-gcc.h | 2 +- > > include/linux/compiler.h | 2 +- > > lib/Kconfig.debug | 21 +++++++++++++++++++++ > > 4 files changed, 27 insertions(+), 2 deletions(-) > > > > > diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug > > index 90f35ad..2432e77d 100644 > > --- a/lib/Kconfig.debug > > +++ b/lib/Kconfig.debug > > @@ -211,6 +211,27 @@ config NO_AUTO_INLINE > > > > Use only if you want to debug the kernel. > > > > +config DEBUG_EXPERIENCE > > + bool "Optimize for better debugging experience (-Og)" > > + default n > > + select NO_AUTO_INLINE > > + depends on !CC_OPTIMIZE_FOR_SIZE > > + help > > + This will apply GCC '-Og' optimization level get supported from > > which is supported since > > > + GCC 4.8. This optimization level offers a reasonable level of > > + optimization while maintaining fast compilation and a good > > + debugging experience. It is similar to '-O1' while perfer keeping > > while preferring to keep > > > + debug ability over runtime speed. The overall performance will > > + drop a bit. > > + > > + If enabling this option break your kernel, you should either > > breaks > > > + disable this or find a fix (mostly in the arch code). Currently > > + this option has only be tested in qemu x86_64 guest. > > + > > + Use only if you want to debug the kernel, especially if you want > > + to have better kernel debugging experience with gdb facilities > > + like kgdb and qemu. > > + > > config ENABLE_WARN_DEPRECATED > > bool "Enable __deprecated logic" > > default y > > > > thanks, > -- > ~Randy Thanks for your correction, I will update. -- Thanks, Changbin Du