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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id DF861C43334 for ; Sat, 23 Jul 2022 03:54:07 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229611AbiGWDyG (ORCPT ); Fri, 22 Jul 2022 23:54:06 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53866 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229469AbiGWDyF (ORCPT ); Fri, 22 Jul 2022 23:54:05 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 190B15C341 for ; Fri, 22 Jul 2022 20:54:05 -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 B7719B82903 for ; Sat, 23 Jul 2022 03:54:03 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7B6B0C341C0; Sat, 23 Jul 2022 03:54:00 +0000 (UTC) Date: Fri, 22 Jul 2022 23:53:58 -0400 From: Steven Rostedt To: Jiri Olsa Cc: Alexei Starovoitov , Alexei Starovoitov , Daniel Borkmann , Andrii Nakryiko , Ingo Molnar , bpf , Martin KaFai Lau , Song Liu , Yonghong Song , John Fastabend , KP Singh , Stanislav Fomichev , Hao Luo Subject: Re: [RFC] ftrace: Add support to keep some functions out of ftrace Message-ID: <20220722235358.0eaa62d0@rorschach.local.home> In-Reply-To: <20220722174120.688768a3@gandalf.local.home> References: <20220722110811.124515-1-jolsa@kernel.org> <20220722072608.17ef543f@rorschach.local.home> <20220722120854.3cc6ec4b@gandalf.local.home> <20220722122548.2db543ca@gandalf.local.home> <20220722174120.688768a3@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 Precedence: bulk List-ID: X-Mailing-List: bpf@vger.kernel.org On Fri, 22 Jul 2022 17:41:20 -0400 Steven Rostedt wrote: > > I think I understand the fentry/ftrace equivalence you see, I remember > > the perl mcount script ;-) > > It's even more than that. We worked with the compiler folks to get fentry > for ftrace purposes (namely to speed it up, and not rely on frame > pointers, which mcount did). fentry never existed until then. Like I said. > fentry was created *for* ftrace. And currently it's x86 specific, as it > relies on the calling convention that a call does both, push the return > address onto the stack, and jump to a function. The blr > (branch-link-register) method is more complex, which is where the > "patchable" work comes from. If you are interested in more details about the birth of fentry, here's the email that started it all: https://lore.kernel.org/lkml/1258657614.22249.824.camel@gandalf.stny.rr.com/ -- Steve