From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga17.intel.com ([192.55.52.151]:46278 "EHLO mga17.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726279AbeHFU2t (ORCPT ); Mon, 6 Aug 2018 16:28:49 -0400 Date: Mon, 6 Aug 2018 11:07:40 -0700 From: Andi Kleen Subject: Re: [PATCH 2/4] trace: avoid calling cc-option -mrecord-mcount for every Makefile Message-ID: <20180806180740.GI4238@tassilo.jf.intel.com> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Sender: linux-kbuild-owner@vger.kernel.org List-ID: To: Vasily Gorbik Cc: Masahiro Yamada , Michal Marek , Martin Schwidefsky , Heiko Carstens , Steven Rostedt , Ingo Molnar , linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org, linux-s390@vger.kernel.org On Mon, Aug 06, 2018 at 03:17:44PM +0200, Vasily Gorbik wrote: > Currently if CONFIG_FTRACE_MCOUNT_RECORD is enabled -mrecord-mcount > compiler flag support is tested for every Makefile. Good catch. Does it make a measurable compile time difference? > > Top 4 cc-option usages: > 511 -mrecord-mcount > 11 -fno-stack-protector > 9 -Wno-override-init > 2 -fsched-pressure > > To address that move cc-option from scripts/Makefile.build to top Makefile > and export CC_USING_RECORD_MCOUNT to be used in original place. > > While doing that also add -mrecord-mcount to CC_FLAGS_FTRACE (if gcc > actually supports it). > > Signed-off-by: Vasily Gorbik Acked-by: Andi Kleen -Andi