Received: by 10.192.165.148 with SMTP id m20csp5061462imm; Tue, 1 May 2018 08:26:01 -0700 (PDT) X-Google-Smtp-Source: AB8JxZp+2lnvoEWq9m33NSpAeXhp3N3DxbD2GiP+Rq5r3tOWBBsDkbpc9t2qzrNhnjQHfAHeZ9YP X-Received: by 10.98.7.75 with SMTP id b72mr8749472pfd.133.1525188361645; Tue, 01 May 2018 08:26:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1525188361; cv=none; d=google.com; s=arc-20160816; b=F9AMxPbjuPLarc8DelBYIB5t3x/qjUbEWkR/PLzZO2aXeorF+rgBAFWvbDfq1a7A8r egx8FduEsnN3fZarK60X2s+COYa8e18DoQFHkEJZgkCSkUFl2kTMRQPpBx5V32S7JBiU u6As+zw6Cu0N6Z+vS1jdAAoi4SHWFo1wHd8+FgRj9HumzrR7wkWyH7jFlenu7UivgYIT /hW3TFxfVO5ncz+U4LY5J+UBbMgpgifFmzTaIDuxbxuAH+Tj/O5YH+0saNRwFv1a6HrO FB8ge+KiK9HsSjh4ZlLagz6AfLaK3TG6ijyPQxomNiY4PGpsGdFNNHmaJIe9mp0sGt4p TTvA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature :arc-authentication-results; bh=MP3n2r74qXmdil0gJop2g449dtSqO6y170UOI1xK4tM=; b=J0l5VJfQ3YUWwow9qtKeTvPRxE4W2FJOTh+T1SzTCc7UvRxbSFRtI4yVqdbfbw4F4I SSg8g9lzWO+wgBeaNxbAbDXFRmAI7dTpDgJVNwta74Lh5vSSsNUrAOMT672SDjk/I1SY 2mhJDAnUfcjUgDlaSI3GICfhtF9VQR/FKv47byBtFHhkGQH8c7tcyV+c55aHUT509XPp 01lfOZundA9Gd+kuYzABJUyu5gCoorymvfrSii/Do/IP3nbY7u/Q94J7gg6cEKi/k2UV +Tyh5rpPAMnwx4bur9xFe6IvG3QQe23ZEQtqbLrQRinX9vl7IgPbkIZGpnY1S30sJDFJ yLUQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=Vh0iol49; 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 d17-v6si7796254pgv.188.2018.05.01.08.25.46; Tue, 01 May 2018 08:26:01 -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; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=Vh0iol49; 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 S1755955AbeEAPZd (ORCPT + 99 others); Tue, 1 May 2018 11:25:33 -0400 Received: from bombadil.infradead.org ([198.137.202.133]:37882 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750787AbeEAPZb (ORCPT ); Tue, 1 May 2018 11:25:31 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=Content-Transfer-Encoding: Content-Type:In-Reply-To:MIME-Version:Date:Message-ID:From:References:Cc:To: Subject:Sender:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=MP3n2r74qXmdil0gJop2g449dtSqO6y170UOI1xK4tM=; b=Vh0iol49T7gC6q4gNe1OeTRAg pGqsji3BAyrU/NMFidTQIpS28UmuoKhfCnF2BdbLFC7HsrL2Jq1L1+O0k1VSkV+z9+nKLEMM4OMvN ZkYcqoK/10KPue4bsZEmIxqO9fXRCkFiixMN6cISiVF13GDlvm7xPszfGHGisjXpmFTsbktv1iJwx z/R3+8uZgX/MMa9jR2gjdbZJtLhLBEYgIfTOAdBROllXMSnKK0gK7W6ZwF4re5t+aJdTV2bJRfO4j R6Ht1DPK/hjhFXV0268jb2ommLJfCj0oHZXYpNY6EN6qMGp9Ksa1h7TGXvBnjxMZ38Hz61jvk1r9y +532uEg7Q==; Received: from static-50-53-52-16.bvtn.or.frontiernet.net ([50.53.52.16] helo=midway.dunlab) by bombadil.infradead.org with esmtpsa (Exim 4.90_1 #2 (Red Hat Linux)) id 1fDX9l-0005Ly-Gw; Tue, 01 May 2018 15:25:29 +0000 Subject: Re: [PATCH 4/5] kernel hacking: new config DEBUG_EXPERIENCE to apply GCC -Og optimization To: changbin.du@intel.com, yamada.masahiro@socionext.com, michal.lkml@markovi.net, tglx@linutronix.de, mingo@redhat.com, akpm@linux-foundation.org Cc: 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 References: <1525179614-14571-1-git-send-email-changbin.du@intel.com> <1525179614-14571-5-git-send-email-changbin.du@intel.com> From: Randy Dunlap Message-ID: Date: Tue, 1 May 2018 08:25:27 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 MIME-Version: 1.0 In-Reply-To: <1525179614-14571-5-git-send-email-changbin.du@intel.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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