Received: by 2002:a05:7412:1e0b:b0:fc:a2b0:25d7 with SMTP id kr11csp535644rdb; Thu, 15 Feb 2024 07:38:45 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCV4zEFhYIXEKHtZyRKHyhhuavFhAzmfJ/G8zOwUj8Ko73yw5CVwW9jxMz8+ko2OLyQrxT6AtzlhNAVJbTAqb8CEkrwSkKWbi8tXDYxFjQ== X-Google-Smtp-Source: AGHT+IGakUkaxsC752z1seMGmBw+XIHBVUkiq51/cnwZ9x2VzSzLEMoy7cR6K0WE//GframO2s5+ X-Received: by 2002:a05:6871:8a1:b0:218:4eb8:5347 with SMTP id r33-20020a05687108a100b002184eb85347mr1995071oaq.20.1708011525514; Thu, 15 Feb 2024 07:38:45 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708011525; cv=pass; d=google.com; s=arc-20160816; b=F4LaZ01LF7PiPr19Yxe7muGQ262AX4VSXrXRlBTFop09FeGwXw7uA+pptgA0aOE2i7 fd5V5wN0JHQ9jDfqVTGXvwoMP9A1YRkHfJkRkc4onZfLJbzLYR/ixIgzc9zuygKhDSrn N7XU9Odjomne4W+DwQsqwinIFBItLoPgi2krHA0jF/oSRRWnwpWjFVykO0IhzBHZVsuX RcpHOHRCVKGE22DpfPLHgXxMtoxfNjmqmK/+APaUEN8WZcuwTOa79WN6AedGSgWdVtu9 Ridjpn1FZumD8m8HHcz1KUEd60Uit2MUqUIm8hWx8LzRl4dSBiF5oJrbnUSvrAEKgNva SX1A== 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; bh=xjTC6C9Ps30Fp8Bt4fxGcHdeAf/kEHOf/x5EOj+jkWc=; fh=VaF/w+FGpk/prTFLJfCoV+GJDmV0Sd6dt8EMZrBTbz0=; b=JHE4r2xdC4dlO9KnjTHFMrB1Gbg336GihZLZjpxYAqDXfOkmHarZXOpyAblSIbE3xM nN3LtbHcHligSRwtpR64QOf5aME7arZ67wkVIEV1id3Ky4ODYMa7ZPD2dVd8UY59YvKz 22TOsdPUn/F/O9HnQ66qaiLTHZyvSjv1tFCYnoXfXOVdE6fUWgBtnWfzY4LTAwi3C3Gm 69HnTGx1FNGVCqpBKzPsJ0Z9GoPDW9mMcXGOO9OZz8KHRlzspJc/QAjMTMiAjaPk3QQ0 2+qqtd7JrH2KLjtp3sDBmgTsbOlmUcHsTyO0pWyaC3C7yyYlWe1c7po7tyCGULL2oAuI ElkQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1); spf=pass (google.com: domain of linux-kernel+bounces-67208-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-67208-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id y7-20020a05620a44c700b007873afc6834si907347qkp.277.2024.02.15.07.38.45 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 15 Feb 2024 07:38:45 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-67208-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; arc=pass (i=1); spf=pass (google.com: domain of linux-kernel+bounces-67208-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-67208-linux.lists.archive=gmail.com@vger.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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 088561C229BC for ; Thu, 15 Feb 2024 15:38:38 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 137EF1353E8; Thu, 15 Feb 2024 15:36:57 +0000 (UTC) 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 883B1132481; Thu, 15 Feb 2024 15:36:56 +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=1708011416; cv=none; b=gWM1VSsX5fnW+LUHuyPEI4UClnkR+9fPtbNWH3uBlYaMlgoAaVDH/clKxgdy5KhT73ak5Cr0b7qiJ/uEWxGLr7ADlpKvKwyDYY7bndwvYjroQqhdtlMZnsIyjchXYVP5PbsrkmtxO2GOs6dy2xjdewo5otnZ5103G2mBV7EgyOk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708011416; c=relaxed/simple; bh=RRjgbqQNeV1LQqQ3WnLweLVY4UkjS1hhaS8MNsvQOJ0=; h=Date:From:To:Cc:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=LgwxtWELGTVUvaasL6mVwQgm9+JqE3vIHMc2mMkMsETF8ukaDs7oz9khSgkKmt/qSEClCUwVu2KnjxOFu+jcvsUiDIG+KayaZ2h5bIZ8xJrkt3AsBbemWG72mF4HorudmOR036eAS0qzO3TGHSF4hIjDbHRjX4sQIOunLZB1+jw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 53C5DC433C7; Thu, 15 Feb 2024 15:36:54 +0000 (UTC) Date: Thu, 15 Feb 2024 10:38:27 -0500 From: Steven Rostedt To: "Masami Hiramatsu (Google)" 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 22/36] function_graph: Add a new entry handler with parent_ip and ftrace_regs Message-ID: <20240215103827.2c7bd2bf@gandalf.local.home> In-Reply-To: <170723229401.502590.8644663781359457778.stgit@devnote2> References: <170723204881.502590.11906735097521170661.stgit@devnote2> <170723229401.502590.8644663781359457778.stgit@devnote2> X-Mailer: Claws Mail 3.19.1 (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 Wed, 7 Feb 2024 00:11:34 +0900 "Masami Hiramatsu (Google)" wrote: > From: Masami Hiramatsu (Google) > > Add a new entry handler to fgraph_ops as 'entryregfunc' which takes > parent_ip and ftrace_regs. Note that the 'entryfunc' and 'entryregfunc' > are mutual exclusive. You can set only one of them. > > Signed-off-by: Masami Hiramatsu (Google) > --- > #ifdef CONFIG_FUNCTION_GRAPH_TRACER > @@ -1070,6 +1075,7 @@ extern int ftrace_graph_entry_stub(struct ftrace_graph_ent *trace, struct fgraph > struct fgraph_ops { > trace_func_graph_ent_t entryfunc; > trace_func_graph_ret_t retfunc; > + trace_func_graph_regs_ent_t entryregfunc; if entryfunc and entryregfunc are mutually exclusive, then why not make them into a union? struct fgraph_ops { union { trace_func_graph_ent_t entryfunc; trace_func_graph_regs_ent_t entryregfunc; }; trace_func_graph_ret_t retfunc; -- Steve > struct ftrace_ops ops; /* for the hash lists */ > void *private; > int idx;