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 B0D1CC433EF for ; Fri, 4 Feb 2022 02:20:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1356627AbiBDCUA (ORCPT ); Thu, 3 Feb 2022 21:20:00 -0500 Received: from ams.source.kernel.org ([145.40.68.75]:48124 "EHLO ams.source.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234237AbiBDCT7 (ORCPT ); Thu, 3 Feb 2022 21:19:59 -0500 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 8AD96B817E5; Fri, 4 Feb 2022 02:19:58 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id AE461C340E8; Fri, 4 Feb 2022 02:19:55 +0000 (UTC) Date: Thu, 3 Feb 2022 21:19:54 -0500 From: Steven Rostedt To: Alexei Starovoitov Cc: Masami Hiramatsu , Jiri Olsa , Alexei Starovoitov , Daniel Borkmann , Andrii Nakryiko , Network Development , bpf , lkml , Martin KaFai Lau , Song Liu , Yonghong Song , John Fastabend , KP Singh , Jiri Olsa Subject: Re: [PATCH 0/8] bpf: Add fprobe link Message-ID: <20220203211954.67c20cd3@gandalf.local.home> In-Reply-To: References: <20220202135333.190761-1-jolsa@kernel.org> <20220204094619.2784e00c0b7359356458ca57@kernel.org> <20220204110704.7c6eaf43ff9c8f5fe9bf3179@kernel.org> 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: netdev@vger.kernel.org On Thu, 3 Feb 2022 18:12:11 -0800 Alexei Starovoitov wrote: > > No, fprobe is NOT kprobe on ftrace, kprobe on ftrace is already implemented > > transparently. > > Not true. > fprobe is nothing but _explicit_ kprobe on ftrace. > There was an implicit optimization for kprobe when ftrace > could be used. > All this new interface is doing is making it explicit. > So a new name is not warranted here. > > > from that viewpoint, fprobe and kprobe interface are similar but different. > > What is the difference? > I don't see it. IIUC, a kprobe on a function (or ftrace, aka fprobe) gives some extra abilities that a normal kprobe does not. Namely, "what is the function parameters?" You can only reliably get the parameters at function entry. Hence, by having a probe that is unique to functions as supposed to the middle of a function, makes sense to me. That is, the API can change. "Give me parameter X". That along with some BTF reading, could figure out how to get parameter X, and record that. -- Steve