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 678B0C636CC for ; Mon, 20 Feb 2023 10:36:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230466AbjBTKgN (ORCPT ); Mon, 20 Feb 2023 05:36:13 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55874 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230052AbjBTKgL (ORCPT ); Mon, 20 Feb 2023 05:36:11 -0500 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id E54EE18AA0 for ; Mon, 20 Feb 2023 02:36:10 -0800 (PST) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 8C64415BF; Mon, 20 Feb 2023 02:36:53 -0800 (PST) Received: from FVFF77S0Q05N (unknown [10.57.15.112]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id DE29C3F703; Mon, 20 Feb 2023 02:36:08 -0800 (PST) Date: Mon, 20 Feb 2023 10:35:57 +0000 From: Mark Rutland To: Masami Hiramatsu Cc: Guo Ren , =?utf-8?B?QmrDtnJuIFTDtnBlbA==?= , "liaochang (A)" , palmer@dabbelt.com, paul.walmsley@sifive.com, conor.dooley@microchip.com, penberg@kernel.org, linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org, Guo Ren Subject: Re: [PATCH] riscv: kprobe: Optimize kprobe with accurate atomicity Message-ID: References: <20230126161559.1467374-1-guoren@kernel.org> <0abbbdd4-6b85-9659-03ee-97c56a5b77c1@huawei.com> <87r0vc9h4g.fsf@all.your.base.are.belong.to.us> <20230217002351.112635f4fb35f84002666d29@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230217002351.112635f4fb35f84002666d29@kernel.org> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Feb 17, 2023 at 12:23:51AM +0900, Masami Hiramatsu wrote: > On Tue, 31 Jan 2023 10:33:05 +0000 > Mark Rutland wrote: > > > On Tue, Jan 31, 2023 at 09:48:29AM +0800, Guo Ren wrote: > > > On Mon, Jan 30, 2023 at 11:49 PM Mark Rutland wrote: > > Masami, Steve, and I had a chat at the tracing summit late last year (which > > unfortunately, was not recorded), and what we'd like to do is get each > > architecture to have FPROBE (and FTRACE_WITH_ARGS), at which point OPTPROBE > > and KRETPROBE become redundant and could be removed. > > No, the fprobe will replace the KRETPROBE but not OPTPROBE. The OPTPROBE > is completely different one. Fprobe is used only for function entry, but > optprobe is applied to the function body. Sorry, I had OPTPROBE and KPROBE_ON_FTRACE confused in my head, and was thinking that FPROBE would supersede KPROBE_ON_FTRACE and KRETPROBE. > > i.e. we'd keep KPROBES as a "you can trace any instruction" feature, but in the > > few cases where OPTPROBES can make things fater by using FTRACE, you should > > just use that directly via FPROBE. > > I think what you are saying is KPROBE_ON_FTRACE, and that will be replaced by > FPROBES. Yes, sorry for the confusion. Mark.