Received: by 2002:a05:6a10:6d25:0:0:0:0 with SMTP id gq37csp369033pxb; Sat, 11 Sep 2021 07:35:02 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzC81CEgzHb1QtL0UAiPO9felPp3TXfcqRn7hkmz/CGKU0ClqmaaCuZ66Ti1nWsmAmTZKXQ X-Received: by 2002:a6b:7519:: with SMTP id l25mr2108633ioh.169.1631370902485; Sat, 11 Sep 2021 07:35:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631370902; cv=none; d=google.com; s=arc-20160816; b=BByJYrGI4esMWk1PficLluVBOnKraYyqqZjadDkGCYNWeNqQRbRG588j3kAy0Aw7Kn nkjoWW3MaUfBkzjlVlvjBWN9Fd5jvbz6DtjpAf29WoFgSWLGlbSBYfCHeZsAikfIt2ab Gej90F8X633TaVtEI6sZZAVaKHyr4YWejBvNS3/VIYYoivhs2tKBpjJMKMMFbQIezqlR betdPoZGclgI9SiyKKWrlkMlj5nd5jen51j2W2DlAXkjKVYSswC5ARO9Qz5jjCa5dkTh mCEllUm2u/2xLeaxU/Oz3MIxcCz/hB+LTNXK8ma7iVTaKNASJiAbaWxhDbyFYZh0S4I4 NCVw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=ShRjim8n5p6DQpCLWF2gXVF23dXXXzBR5oQN0FhTBgU=; b=Ky06CuzdJgEEjt/JRfkFQ+DyVN3vvyv0Ba3xRLgwxf9/jVRdPQkSIBusOvUQ0HAjJ6 kQjPH/Ak+XrkVXix2Ckb7/WKMWt5GKSNHpOipO+gOrpX6t6kaJX4VeTwVzGz3SeGcQLx KW4Bf1Tbij6Il43wAzi0o9llR8kGDGleAfR41aAL7vGDnW1xQiZOVs7fw9EztR49e5Nc ocaBTe8HTMeolHOJpfYandjZwrSB42+MpMAXD8R6dHgkWub5yuERWd/iYRdCgp7aZAIV jsWO0j/rCPg18AaKltsb2wgeVRMHy6iAwsk3QKyLruOVxJL7w30FluyobE0aeDjPJ+jl AoZQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=desiato.20200630 header.b=iuNRsqjn; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id z7si1771900ils.59.2021.09.11.07.34.50; Sat, 11 Sep 2021 07:35:02 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=desiato.20200630 header.b=iuNRsqjn; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229550AbhIKOfX (ORCPT + 99 others); Sat, 11 Sep 2021 10:35:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36636 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229452AbhIKOfW (ORCPT ); Sat, 11 Sep 2021 10:35:22 -0400 Received: from desiato.infradead.org (desiato.infradead.org [IPv6:2001:8b0:10b:1:d65d:64ff:fe57:4e05]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id ED925C061574 for ; Sat, 11 Sep 2021 07:34:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=desiato.20200630; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=ShRjim8n5p6DQpCLWF2gXVF23dXXXzBR5oQN0FhTBgU=; b=iuNRsqjnZHSPqNpRzhAyTHbMEF VWO3+v1gWI1hszFdHXOf0fMQ8AyJ0CpF5KiBjS27bkoARpW5io38UVKMHAjlLRGXsJ1o2oTSVD8Lp Btq324bXVsrKSziJuwvWXgUzKPESBrpa8KwqsFcGCm2qpWHjsa4Br6h3WjHSPpZ0Aa9TgnKuVggHy /9kW0nqTZWmwhpBKdS0B/Zp8WgzFQA89HQJrZkiv5PDE+ppBEvrhtQg1NCm0MRFJ0luWOgWlijot6 OpHvQRY3WmjdF18rTeRcBJvmjT3ISp69tALn5uq+Mx5hEt9a+qBL7cNXWCuqldrIeLjjYAsMJsqa6 MKUEPMJw==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=worktop.programming.kicks-ass.net) by desiato.infradead.org with esmtpsa (Exim 4.94.2 #2 (Red Hat Linux)) id 1mP44m-002Ocj-SG; Sat, 11 Sep 2021 14:33:53 +0000 Received: by worktop.programming.kicks-ass.net (Postfix, from userid 1000) id 57EC69862C9; Sat, 11 Sep 2021 16:33:52 +0200 (CEST) Date: Sat, 11 Sep 2021 16:33:52 +0200 From: Peter Zijlstra To: Yinan Liu Cc: rostedt@goodmis.org, mark-pk.tsai@mediatek.com, mingo@redhat.com, linux-kernel@vger.kernel.org Subject: Re: [PATCH 2/2] scripts: ftrace - move the nop-processing in ftrace_init to compile time Message-ID: <20210911143352.GA4323@worktop.programming.kicks-ass.net> References: <20210911135043.16014-1-yinan@linux.alibaba.com> <20210911135043.16014-3-yinan@linux.alibaba.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210911135043.16014-3-yinan@linux.alibaba.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Sep 11, 2021 at 09:50:43PM +0800, Yinan Liu wrote: > When ftrace is enabled, ftrace_init will consume a period of > time, usually around 15~20ms. Approximately 60% of the time is > consumed by nop-processing. Moving the nop-processing to the > compile time can speed up the kernel boot process. > > performance test: > env: Intel(R) Xeon(R) CPU E5-2682 v4 @ 2.50GHz If you use objtool's -M argument instead of recordmcount, you already get this and you can avoid running recordmcount entirely.