Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932492AbbDMTcQ (ORCPT ); Mon, 13 Apr 2015 15:32:16 -0400 Received: from smtprelay0059.hostedemail.com ([216.40.44.59]:49504 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751376AbbDMTcP (ORCPT ); Mon, 13 Apr 2015 15:32:15 -0400 X-Session-Marker: 726F737465647440676F6F646D69732E6F7267 X-Spam-Summary: 50,0,0,,d41d8cd98f00b204,rostedt@goodmis.org,:::::::::,RULES_HIT:41:355:379:541:599:800:960:967:973:982:988:989:1260:1277:1311:1313:1314:1345:1359:1431:1437:1515:1516:1518:1534:1541:1593:1594:1711:1730:1747:1777:1792:2393:2525:2553:2560:2563:2682:2685:2859:2933:2937:2939:2942:2945:2947:2951:2954:3022:3138:3139:3140:3141:3142:3353:3622:3865:3866:3867:3868:3871:3872:3874:3934:3936:3938:3941:3944:3947:3950:3953:3956:3959:4362:4641:5007:6119:6261:7576:7875:7903:8660:8829:8985:9025:10004:10400:10450:10455:10848:10967:11026:11232:11473:11658:11914:12043:12296:12438:12517:12519:12555:12740:13069:13148:13161:13229:13230:13311:13357:19904:19999:21080,0,RBL:none,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:fn,MSBL:0,DNSBL:none,Custom_rules:0:0:0 X-HE-Tag: cork92_4da5d41bb2635 X-Filterd-Recvd-Size: 2620 Date: Mon, 13 Apr 2015 15:32:12 -0400 From: Steven Rostedt To: Andi Kleen Cc: linux-kernel@vger.kernel.org, linux-kbuild@vger.kernel.org, mmarek@suse.cz, Andi Kleen Subject: Re: [PATCH] Use -mcount-record for dynamic ftrace Message-ID: <20150413153212.131fabc1@gandalf.local.home> In-Reply-To: <1428886467-4969-1-git-send-email-andi@firstfloor.org> References: <1428886467-4969-1-git-send-email-andi@firstfloor.org> X-Mailer: Claws Mail 3.11.1 (GTK+ 2.24.25; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1927 Lines: 66 On Sun, 12 Apr 2015 17:54:27 -0700 Andi Kleen wrote: > From: Andi Kleen > > gcc 5 supports a new -mcount-record option to generate ftrace > tables directly. This avoids the need to run record_mcount > manually. > > Use this option when available. > > It also has a -mcount-nop option to generate the mcount calls > as nops. So far that is not implemented, but it could be used > to optimize patching at boot up. Interesting. But I can't accept this until I can test it. I don't have the time to build gcc from scratch, and currently none of my boxes have a gcc 5 install. I wonder who's responsible for https://www.kernel.org/pub/tools/crosstool/files/bin/x86_64/ If they can add a i386/x86_64 build for gcc5 I'll be happy to download it and test this patch. Thanks, -- Steve > > Signed-off-by: Andi Kleen > --- > scripts/Makefile.build | 6 ++++++ > 1 file changed, 6 insertions(+) > > diff --git a/scripts/Makefile.build b/scripts/Makefile.build > index 01df30a..f258e9b 100644 > --- a/scripts/Makefile.build > +++ b/scripts/Makefile.build > @@ -210,6 +210,11 @@ cmd_modversions = \ > fi; > endif > > +# gcc 5 supports generating the mcount tables directly > +ifneq ($(call cc-option,-mrecord-mcount,y),y) > +KBUILD_CFLAGS += -mrecord-mcount > +else > +# else do it all manually > ifdef CONFIG_FTRACE_MCOUNT_RECORD > ifdef BUILD_C_RECORDMCOUNT > ifeq ("$(origin RECORDMCOUNT_WARN)", "command line") > @@ -240,6 +245,7 @@ cmd_record_mcount = \ > $(sub_cmd_record_mcount) \ > fi; > endif > +endif > > define rule_cc_o_c > $(call echo-cmd,checksrc) $(cmd_checksrc) \ -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/