Received: by 2002:a05:6a10:6d10:0:0:0:0 with SMTP id gq16csp971906pxb; Fri, 22 Apr 2022 15:40:21 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwcD+t3sbq1vhxWmvrq8W1/z9LH0I3+tP452ggTLsoEEjMQhNCxKaLCG0b2JdeD2yHr2j1l X-Received: by 2002:a05:6a00:23d5:b0:50a:93e9:965e with SMTP id g21-20020a056a0023d500b0050a93e9965emr7434821pfc.10.1650667221326; Fri, 22 Apr 2022 15:40:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650667221; cv=none; d=google.com; s=arc-20160816; b=NKrHeImURP0klhe3OETov25Ww+QVkEZmRRR+qhYabRiZCWk3787W0RrGyD6TFH25Nc qeQrkzG1SBariAl2lFd5ql4iGeC+FyDJVrG1obFb5XjOXoNz4RibqCG1/PGXzf+Gxgki qdgAipupBhMOFMD28Mxiq+IfAaFFDReX4volWbtvLgILxKepKf56WrzpzDH2TwbHCmRA kdl30luG9q2beXLUaY1VBp//DaVXXKzpde1Gb22VnNJaC5HEiZgXSrLRiliqHenf7ndB 6lvhmQVoaGEZoulU5VP3VFD/nBbpucKC9EEFtFJIlO4Bv8mMkHkyqm5e8nf5svcwrDmb b+Ug== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date; bh=ZLTmpwtrbECo/syXFrQQqclKhOz9Aumx2U2C8Pq8xo4=; b=lFSxHGt2bbOSlPM0jJfKbRA8hgU0a2lOSvbtO1rof0ubyTGe/+C9/Vt+Yab250++qE FMEXOxvp2haB/oyV/xy/Gf6g8gXvS22A68P08M38MdYbAq+zvCpT8nfxs+d4fnxTOZPd i5BBEfndELFc+JHkqtO7osbTLL7yxArMiy4X/OB8SyTpNy6jMJSrVYIm/hA6qvaX5DQ6 mnk+avzHa5P6WBj9d8/nLOeAycLjQ1OcUN+EJeg9WxZnDbSGI3xw0KiurQOYC5DaBJgz RR0XZhatYQz2sZdXAAjo9m3Kuol3gMfj3AtQwOXUCZ++xHEVMn3533NNVaaOt8+0mRJp T3oA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id rj14-20020a17090b3e8e00b001cac1e802d5si9093457pjb.82.2022.04.22.15.40.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 Apr 2022 15:40:21 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (out1.vger.email [IPv6:2620:137:e000::1:20]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 24E4E3CE981; Fri, 22 Apr 2022 13:28:24 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1388942AbiDUOMR (ORCPT + 99 others); Thu, 21 Apr 2022 10:12:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47386 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1389068AbiDUOMG (ORCPT ); Thu, 21 Apr 2022 10:12:06 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 593792DAB1 for ; Thu, 21 Apr 2022 07:09:04 -0700 (PDT) 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 EC080B8229C for ; 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 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RDNS_NONE, SPF_HELO_NONE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.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