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 08479C433EF for ; Thu, 10 Feb 2022 14:59:51 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S243300AbiBJO7s (ORCPT ); Thu, 10 Feb 2022 09:59:48 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:43632 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S243267AbiBJO7r (ORCPT ); Thu, 10 Feb 2022 09:59:47 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9BB4610A for ; Thu, 10 Feb 2022 06:59:48 -0800 (PST) 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 dfw.source.kernel.org (Postfix) with ESMTPS id 34F2461B30 for ; Thu, 10 Feb 2022 14:59:48 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 859F0C340E5; Thu, 10 Feb 2022 14:59:46 +0000 (UTC) Date: Thu, 10 Feb 2022 09:59:44 -0500 From: Steven Rostedt To: "Naveen N. Rao" Cc: Alexei Starovoitov , bpf@vger.kernel.org, Daniel Borkmann , Hari Bathini , Jordan Niethe , Jiri Olsa , linuxppc-dev@lists.ozlabs.org, Michael Ellerman , Yauheni Kaliuta Subject: Re: [RFC PATCH 2/3] powerpc/ftrace: Override ftrace_location_lookup() for MPROFILE_KERNEL Message-ID: <20220210095944.1fe98b74@gandalf.local.home> In-Reply-To: <1644501274.apfdo9z1hy.naveen@linux.ibm.com> References: <20220207102454.41b1d6b5@gandalf.local.home> <1644426751.786cjrgqey.naveen@linux.ibm.com> <20220209161017.2bbdb01a@gandalf.local.home> <1644501274.apfdo9z1hy.naveen@linux.ibm.com> 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 Thu, 10 Feb 2022 13:58:29 +0000 "Naveen N. Rao" wrote: > diff --git a/kernel/trace/ftrace.c b/kernel/trace/ftrace.c > index f9feb197b2daaf..68f20cf34b0c47 100644 > --- a/kernel/trace/ftrace.c > +++ b/kernel/trace/ftrace.c > @@ -1510,6 +1510,7 @@ ftrace_ops_test(struct ftrace_ops *ops, unsigned long ip, void *regs) > } > > > +#ifndef ftrace_cmp_recs > static int ftrace_cmp_recs(const void *a, const void *b) > { > const struct dyn_ftrace *key = a; > @@ -1521,6 +1522,7 @@ static int ftrace_cmp_recs(const void *a, const void *b) > return 1; > return 0; > } > +#endif > I don't really care for this part, as it seems somewhat ugly. But this patch does appear to solve your issue, and I can't think of a prettier way to do this. So, I will reluctantly ack it. If anything, please add a comment above saying that architectures may need to override this function, and when doing so, they will define their own ftrace_cmp_recs. -- Steve 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 lists.ozlabs.org (lists.ozlabs.org [112.213.38.117]) (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 9A22FC433EF for ; Thu, 10 Feb 2022 15:00:22 +0000 (UTC) Received: from boromir.ozlabs.org (localhost [IPv6:::1]) by lists.ozlabs.org (Postfix) with ESMTP id 4Jvg0N58Nlz3cTj for ; Fri, 11 Feb 2022 02:00:20 +1100 (AEDT) Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=kernel.org (client-ip=145.40.68.75; helo=ams.source.kernel.org; envelope-from=srs0=5j3p=sz=goodmis.org=rostedt@kernel.org; receiver=) Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4Jvfzs0sCrz3bV2 for ; Fri, 11 Feb 2022 01:59:52 +1100 (AEDT) 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 EF385B8253C; Thu, 10 Feb 2022 14:59:48 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 859F0C340E5; Thu, 10 Feb 2022 14:59:46 +0000 (UTC) Date: Thu, 10 Feb 2022 09:59:44 -0500 From: Steven Rostedt To: "Naveen N. Rao" Subject: Re: [RFC PATCH 2/3] powerpc/ftrace: Override ftrace_location_lookup() for MPROFILE_KERNEL Message-ID: <20220210095944.1fe98b74@gandalf.local.home> In-Reply-To: <1644501274.apfdo9z1hy.naveen@linux.ibm.com> References: <20220207102454.41b1d6b5@gandalf.local.home> <1644426751.786cjrgqey.naveen@linux.ibm.com> <20220209161017.2bbdb01a@gandalf.local.home> <1644501274.apfdo9z1hy.naveen@linux.ibm.com> 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-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Daniel Borkmann , Yauheni Kaliuta , Jordan Niethe , linuxppc-dev@lists.ozlabs.org, bpf@vger.kernel.org, Jiri Olsa , Alexei Starovoitov , Hari Bathini Errors-To: linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Sender: "Linuxppc-dev" On Thu, 10 Feb 2022 13:58:29 +0000 "Naveen N. Rao" wrote: > diff --git a/kernel/trace/ftrace.c b/kernel/trace/ftrace.c > index f9feb197b2daaf..68f20cf34b0c47 100644 > --- a/kernel/trace/ftrace.c > +++ b/kernel/trace/ftrace.c > @@ -1510,6 +1510,7 @@ ftrace_ops_test(struct ftrace_ops *ops, unsigned long ip, void *regs) > } > > > +#ifndef ftrace_cmp_recs > static int ftrace_cmp_recs(const void *a, const void *b) > { > const struct dyn_ftrace *key = a; > @@ -1521,6 +1522,7 @@ static int ftrace_cmp_recs(const void *a, const void *b) > return 1; > return 0; > } > +#endif > I don't really care for this part, as it seems somewhat ugly. But this patch does appear to solve your issue, and I can't think of a prettier way to do this. So, I will reluctantly ack it. If anything, please add a comment above saying that architectures may need to override this function, and when doing so, they will define their own ftrace_cmp_recs. -- Steve