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 9D196C4332F for ; Sun, 5 Nov 2023 23:33:08 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229963AbjKEXdJ (ORCPT ); Sun, 5 Nov 2023 18:33:09 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53680 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229485AbjKEXdH (ORCPT ); Sun, 5 Nov 2023 18:33:07 -0500 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6378FBE for ; Sun, 5 Nov 2023 15:33:05 -0800 (PST) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2A28DC433C8; Sun, 5 Nov 2023 23:33:03 +0000 (UTC) Date: Sun, 5 Nov 2023 18:33:01 -0500 From: Steven Rostedt To: Peter Zijlstra Cc: "Masami Hiramatsu (Google)" , Alexei Starovoitov , Florent Revest , linux-trace-kernel@vger.kernel.org, LKML , Martin KaFai Lau , bpf , Sven Schnelle , Alexei Starovoitov , Jiri Olsa , Arnaldo Carvalho de Melo , Daniel Borkmann , Alan Maguire , Mark Rutland , Thomas Gleixner , Guo Ren Subject: Re: [RFC PATCH 24/32] x86/ftrace: Enable HAVE_FUNCTION_GRAPH_FREGS Message-ID: <20231105183301.38be5598@rorschach.local.home> In-Reply-To: <20231105231734.GE3818@noisy.programming.kicks-ass.net> References: <169920038849.482486.15796387219966662967.stgit@devnote2> <169920068069.482486.6540417903833579700.stgit@devnote2> <20231105172536.GA7124@noisy.programming.kicks-ass.net> <20231105141130.6ef7d8bd@rorschach.local.home> <20231105231734.GE3818@noisy.programming.kicks-ass.net> 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: linux-kernel@vger.kernel.org On Mon, 6 Nov 2023 00:17:34 +0100 Peter Zijlstra wrote: > Changelog nor code made it clear this was partial anything. So this is > still the partial thing? > > Can we then pretty clear clarify all that, and make it clear which regs > are in there? Because when I do 'vim -t ftrace_regs' it just gets me a > seemingly pointless wrapper struct, no elucidating comments nothingses. I agree it should be better documented (like everything else). The ftrace_regs must have all the registers needed to produce a function's arguments. For x86_64, that would be: rdi, rsi, rdx, r8, r9, rsp Basically anything that is needed to call mcount/fentry. But yes, it's still partial registers but for archs that support FTRACE_WITH_REGS, it can also hold all pt_regs which can be retrieved by the arch_ftrace_get_regs(), which is why there's a pt_regs struct in the x86 version. But that's not the case for arm64, as arch_ftrace_get_regs() will always return NULL. > > > You even Acked the patch: > > > > commit 02a474ca266a47ea8f4d5a11f4ffa120f83730ad > > Author: Steven Rostedt (VMware) > > Date: Tue Oct 27 10:55:55 2020 -0400 > > You expect me to remember things from 3 years ago? Heh, of course not. I just thought it amusing that I created ftrace_regs because of you and then 3 years later you ask to get rid of it. But the real issue is that it's not documented clearly why it exists, and that should be rectified. Thanks, -- Steve