From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 76F4FC433F5 for ; Thu, 21 Apr 2022 14:10:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=aSg6iRlBF8+ge7UAipreLoEq6O35Iz5N1KELaSKzeS4=; b=iqp24RvRECBEJ8 kZhpPEDcqyXX1gteYfdU/5by37psOlJhOZw5mw7j48ZwHSLCh0N3RtMh21r7VQ43oykRl9Sl8CpPG u6Ct5JxmV85g6tUyV9zv5dQXPv6Ruza9UUbwv9zhzIOIQgj5zKY7n7XVl2P26b/bTKNJqYujeRbOJ l4v+qt+8ZbpkXwiki+dAJqLGUfpT/1kFc1DM2bmF02HRZpNRfjvNbJzuyvQM/PHmiU5ML01NnrOI2 TPNj/4+EPSIDiWctCdr2pLKKlY1wT6eKlt/i6GPj57AMXRLjQ0jTuqWoLlA4NQ3IIsuihrU1Q3sfr +cHetIVmF2J6tUNSnQMA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nhXUa-00Dh66-19; Thu, 21 Apr 2022 14:09:08 +0000 Received: from ams.source.kernel.org ([145.40.68.75]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nhXUW-00Dh4Q-Gv for linux-arm-kernel@lists.infradead.org; Thu, 21 Apr 2022 14:09:06 +0000 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id EF336B824F6; Thu, 21 Apr 2022 14:09:02 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 883D5C385AA; Thu, 21 Apr 2022 14:09:00 +0000 (UTC) Date: Thu, 21 Apr 2022 10:08:59 -0400 From: Steven Rostedt To: Mark Rutland Cc: Wang ShaoBo , cj.chengjian@huawei.com, huawei.libin@huawei.com, xiexiuqi@huawei.com, liwei391@huawei.com, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, catalin.marinas@arm.com, will@kernel.org, zengshun.wu@outlook.com Subject: Re: [RFC PATCH -next v2 3/4] arm64/ftrace: support dynamically allocated trampolines Message-ID: <20220421100859.244c6ae3@gandalf.local.home> In-Reply-To: <20220421100639.03c0d123@gandalf.local.home> References: <20220316100132.244849-1-bobo.shaobowang@huawei.com> <20220316100132.244849-4-bobo.shaobowang@huawei.com> <20220421100639.03c0d123@gandalf.local.home> X-Mailer: Claws Mail 3.17.8 (GTK+ 2.24.33; x86_64-pc-linux-gnu) MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220421_070904_740722_5D22664B X-CRM114-Status: GOOD ( 13.07 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Thu, 21 Apr 2022 10:06:39 -0400 Steven Rostedt wrote: > Without this change, because the arch does not support dynamically > allocated trampolines, it means that all these ftrace_ops will be > registered to the same trampoline. That means, for every function that is > traced, it will loop through all 10 of theses ftrace_ops and check their > hashes to see if their callback should be called or not. Oh, I forgot to mention. If you then enable function tracer that traces *every function*, then *every function* will be going through this loop of the 10 ftrace_ops! With dynamically allocated trampolines, then most functions will just call the trampoline that handles the function tracer directly. -- Steve _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel