Received: by 2002:a05:7412:1e0b:b0:fc:a2b0:25d7 with SMTP id kr11csp968986rdb; Fri, 16 Feb 2024 00:47:42 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCWfCcZrOT2NRudvIEh4pcKBc6iX2lbenuSUM9Et+7oHt6fZK1LzX1Mduq0l18rdpdvihJJs1/Q/x9zKMBOBDfeIt4Wwxb8DLk5qmqffeQ== X-Google-Smtp-Source: AGHT+IFQIzHjkxZhFboGZo+NCa/otHknRxzctN6J9nMB9lcGsqMttmy4G67qFFIEBozKJzJdps4R X-Received: by 2002:a05:6402:1cab:b0:563:eca6:7342 with SMTP id cz11-20020a0564021cab00b00563eca67342mr662455edb.24.1708073262643; Fri, 16 Feb 2024 00:47:42 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708073262; cv=pass; d=google.com; s=arc-20160816; b=R0Cto1lXJ7GJQ2QyRimJiLacmwTbP7UQipCha04EuK6LJv0XNH3tdoTCbfBkHyqdmM TKBnPplKCS56B6V843REtNsuHkjK2r5yBY0QoPQOOvpuedIAVv+Xa1vdCanWGLTAvpPQ otLw1sCbAGaShcr5s+zq/I0uqapfTUH0nd/OMOhGrs3VW4eboAHiGBJrGD89VxuCtsTQ r+JVl5rpKMf4crr1R0FdnON0WguqxUMi5rEIyoGLMns5jAyQvw3JgSUpTg7e5Vk1sy5B GjKYhCZ7V4fbTOB1j24jjbib06uTCso5L6AZ4UJfJL30zSjDt8wRm8hAULC+/OTSWj9D IHiA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :subject:cc:to:from:date:dkim-signature; bh=87Mhf4dCXDKx87LmxNGeWO97c1dIBxBfS6uskyJAbFo=; fh=Ub95fBsiseQVLo56fdyDA2zH9Ec5p8qFryhFaIE+jLo=; b=MhRoWD8Dl+Z8XFtgnYploRmCfSXuk1OO4Rya7DGxIWGKGSvaCo5L1SN5hLctJNTbGo /bZ8vLFdsSkjVcIZLPr4qJsEvgqaptl1XwDRT94CdW1q17nfK2rprCejGy0vSIwwMUYP qPyAhmZ8AWIZiIEU2rCPx23fFFbDmNzTpxJJP1JzFE30WKUjbUGtkpf/MGqNuTQ6u1mR fZrOtkCXxBvs1u/KozZTQE4UuKgJvrRw11ER6Hl+RH4iR217ECDxVa1rTIEqzJjwQHTe s2Pu2C7sLKKz/5GdW5DPubg50wXvZPu5Ob95zy26mp10KMeUjRnDlMijVmTAxDHYolt3 rFxw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=ZNY7Iitu; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-68257-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-68257-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id i2-20020aa7c702000000b00561990d5505si1406269edq.672.2024.02.16.00.47.42 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 16 Feb 2024 00:47:42 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-68257-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=ZNY7Iitu; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-68257-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-68257-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 3832B1F21ED3 for ; Fri, 16 Feb 2024 08:47:42 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id A52051CAAD; Fri, 16 Feb 2024 08:43:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="ZNY7Iitu" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C37C01CA82; Fri, 16 Feb 2024 08:43:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708072984; cv=none; b=tiL8mrlylDDeF8SusNHda49NSebnbEy5tu0hZwqsOAocKkVedS6xiMtrKWbHJdnahJC/krssyXEYDh2akimXbJn8/e0esifnGStNLldhNYN7jYp6tuWdR4tlNxDV7kLB5apLB//6K8JBSbEIP0esnnUVS2jtkwviyVwVYclcG1w= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708072984; c=relaxed/simple; bh=dUyFnkE/QREvSXvoA/9ltiM5n+QJkG7a2KgN3eMQWrM=; h=Date:From:To:Cc:Subject:Message-Id:In-Reply-To:References: Mime-Version:Content-Type; b=TlyUy8R5DgpaR++cndd9fpRZg54qwQxNd6EnsOHOoYgTr/YMWmO76C/zcSI23ZVu38JvI8i9Ukkw3q+rPdeMagCCruo+RI11YjkQ+a7V+dkBl8xZXMGZtGszhhkLTWXyZQv3HEDni+Y8FCPxTGH9D++Vc2ROXcfzgyLG+IujbT8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=ZNY7Iitu; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3C59CC433F1; Fri, 16 Feb 2024 08:43:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1708072984; bh=dUyFnkE/QREvSXvoA/9ltiM5n+QJkG7a2KgN3eMQWrM=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=ZNY7IitueSf4Jo40A5T3r2tLfB4Crt2LsbWM7e552jBU8xqCeYRmdwzrbl4Uw8Wmy Rm/cNBZigbKHjxIdJrP0/HiXKbsrKJPtW6tlWy5Q4apD/vV3HG3giX329DLsjxhVbS VHbyJn1C2EzkaO+lz7OwhbSytyuQ2jS230IUtsy0eJPUPNoYzFLbowlGgPndSLCukO zK2W0X4K5ibVH5XR01QuvMgb6RLrKhqHjBBvUiORaFopJ0S65E+hkuV53n2BrUxedD uYTBwVh79HUW0hYHm6gzF/DWLdXrkf+7NLInT7wtXYNksAYbYukhGx/Kt38Oa7X8WO HbxoD0XCPkYNQ== Date: Fri, 16 Feb 2024 17:42:26 +0900 From: Masami Hiramatsu (Google) To: Steven Rostedt Cc: 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 , Peter Zijlstra , Thomas Gleixner , Guo Ren Subject: Re: [PATCH v7 23/36] function_graph: Add a new exit handler with parent_ip and ftrace_regs Message-Id: <20240216174226.455472a436b40bbf2fd4ee4b@kernel.org> In-Reply-To: <20240215103943.7bf1a30f@gandalf.local.home> References: <170723204881.502590.11906735097521170661.stgit@devnote2> <170723230476.502590.16817817024423790038.stgit@devnote2> <20240215103943.7bf1a30f@gandalf.local.home> X-Mailer: Sylpheed 3.7.0 (GTK+ 2.24.33; x86_64-pc-linux-gnu) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit On Thu, 15 Feb 2024 10:39:43 -0500 Steven Rostedt wrote: > On Wed, 7 Feb 2024 00:11:44 +0900 > "Masami Hiramatsu (Google)" wrote: > > > From: Masami Hiramatsu (Google) > > > > Add a new return handler to fgraph_ops as 'retregfunc' which takes > > parent_ip and ftrace_regs instead of ftrace_graph_ret. This handler > > is available only if the arch support CONFIG_HAVE_FUNCTION_GRAPH_FREGS. > > Note that the 'retfunc' and 'reregfunc' are mutual exclusive. > > You can set only one of them. > > > > Signed-off-by: Masami Hiramatsu (Google) > > > > > @@ -1076,6 +1083,7 @@ struct fgraph_ops { > > trace_func_graph_ent_t entryfunc; > > trace_func_graph_ret_t retfunc; > > trace_func_graph_regs_ent_t entryregfunc; > > + trace_func_graph_regs_ret_t retregfunc; > > Same for this: > > struct fgraph_ops { > union { > trace_func_graph_ent_t entryfunc; > trace_func_graph_regs_ent_t entryregfunc; > }; > union { > trace_func_graph_ret_t retfunc; > trace_func_graph_regs_ret_t retregfunc; > } OK, and we need to introduce a flag for fgraph_ops that it is using `regfunc` or not. Thank you, > > -- Steve > > > > struct ftrace_ops ops; /* for the hash lists */ > > void *private; > > int idx; -- Masami Hiramatsu (Google)