Received: by 2002:a05:7412:2a91:b0:fc:a2b0:25d7 with SMTP id u17csp285858rdh; Tue, 13 Feb 2024 17:41:05 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCXj5nRiZvkaU5jNFfkzkVzkj27cuXS/bLwO1ieVjJS9oCj/1y3oCShIWvTLo3pnsCcoiecHO1wi9D1ynD8PcXjtu5wlv4XLcwolTfL79g== X-Google-Smtp-Source: AGHT+IHLrN62E4g3uT8ngsTmXCqzD4YI8jxWZYepZmJ27Krmnz5hthGogTV3JC9gqigPHRre+N88 X-Received: by 2002:a05:6214:e62:b0:68c:da0a:2108 with SMTP id jz2-20020a0562140e6200b0068cda0a2108mr1589079qvb.28.1707874865661; Tue, 13 Feb 2024 17:41:05 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707874865; cv=pass; d=google.com; s=arc-20160816; b=wrItX7os9J86lBEZO7D8WfMQDc6AE/daUsrJGHajRt7U0gH9xmr9YL0e8bfwbOyeWY ZdLOGnekMe4KU5eznOoBvD4kgbXiS0Bp9vm5hG6+PCCH9FMddrTTqRhnkPJyVZZu0yKH XgoPVgcncXQG3fR74gyLITNhH7D5sY7KzK4UOwBh7jWTvz5q5AXn9HDkNuYLRIX9R672 wTqdFjZbSzQRnwu76QYwXRdcFPXy/P70Clq2YgXnXpqhD3d6YL4fmVLOs8hjbu2eJYgM 3lFd9nRecbQI4iOR7eJZ/TircOjguk5KGBe2k1TYbzbdyfTti/5ytlJbYFmHRCrtXh13 QNNg== 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=yufaqDRkECYcqARhhx4wata3miH02jI98jMUvwc7FJw=; fh=6oti/11L3f+YucihF9LWyNUY/tBNnlHsFUow7mmFUhA=; b=ytntFgeOA4AaY5fCWIbftEwXqfpWPMz9qw2PWwdGSmrMaIabLSTl1hjzNcFBGbjDPh G/yPZ5Y2Sh3dsWu/5EM03jH1rWs8ND6+rnVr2cHwZcrF/rLJCQYGBvdbg7AJk5ZtLB2E j9FFrs6hcu3JsLpcM0b+ml1h/nLEdZSKYipdB7fQ7Qgfzq0VoelwRp7AUUxdcpuH3sLu oCr50hwxs1B4eRAPq/MG3Jb0RyGSqIyUGVUCTAgdqYi8slkw8oG0r2iM6lmSfFurDCK2 T0XIVE77w3yjssBMPzYRmBAIWbcWRMZpCAS4ksgRXfAsDKAvusaKV0wmu++Pu2U5u5P+ qCew==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1); spf=pass (google.com: domain of linux-kernel+bounces-64673-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-64673-linux.lists.archive=gmail.com@vger.kernel.org" X-Forwarded-Encrypted: i=2; AJvYcCXWZtiQv+BlarR5/AzX/DqOCcwwE5ppasLTcogXYtA5SGm3lidkJdXZEtz/UFHqWTrKSB0XXndeb2enTjt3PvZ/RwuhKdSKWrehG/F74A== Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id j10-20020a05621419ca00b0068c64a838b8si4288714qvc.417.2024.02.13.17.41.05 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 13 Feb 2024 17:41:05 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-64673-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; arc=pass (i=1); spf=pass (google.com: domain of linux-kernel+bounces-64673-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-64673-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 D5D821C26A32 for ; Wed, 14 Feb 2024 01:41:02 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 049757493; Wed, 14 Feb 2024 01:40:52 +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 741772563; Wed, 14 Feb 2024 01:40:51 +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=1707874851; cv=none; b=NTAp4vwROsyZ9ny1DkAVQMHR4qPRrDtR+fCupUeTLFwg/6MWQGG96Jupzd36A3lnom2eo400Ha0zHRVK+3b9NdHY3tgXId/GUwJ+t+2eFdgnCwRcyGmcUH9yL7dwYfzIcI5JKIAT+GKSfQxxiRCSrBG4Hs/qSv/gHsWV1+uREt4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707874851; c=relaxed/simple; bh=g3TFwkiBMAVIaASrpmNEdFi6d151GFSpVImlNWOWpKE=; h=Date:From:To:Cc:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=g9L2S97MnbBzkR3Tr0TVZ2lyqKQfMz0swxQ7lHRoggdM2nO1Mb4isEWu+4kj77mx8iw50X8zneYxwW6lgEV6aHE/JO0N5v1Me508l0WC9HPhfKTHWWClJ1FgHfNg5KuoVFHdHI/vY2qBsev8WyK/2iL/f0SIOuOX9cNCnQ/DRBg= 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 2EB03C433F1; Wed, 14 Feb 2024 01:40:49 +0000 (UTC) Date: Tue, 13 Feb 2024 20:42:18 -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 10/36] ftrace/function_graph: Pass fgraph_ops to function graph callbacks Message-ID: <20240213204218.0673fbb0@gandalf.local.home> In-Reply-To: <170723216124.502590.13855631208872523552.stgit@devnote2> References: <170723204881.502590.11906735097521170661.stgit@devnote2> <170723216124.502590.13855631208872523552.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:09:21 +0900 "Masami Hiramatsu (Google)" wrote: > From: Steven Rostedt (VMware) > > Pass the fgraph_ops structure to the function graph callbacks. This will > allow callbacks to add a descriptor to a fgraph_ops private field that wil > be added in the future and use it for the callbacks. This will be useful > when more than one callback can be registered to the function graph tracer. > > Signed-off-by: Steven Rostedt (VMware) > Signed-off-by: Masami Hiramatsu (Google) > --- > Changes in v2: > - cleanup to set argument name on function prototype. > --- > This patch fails to compile without this change: diff --git a/kernel/trace/fgraph.c b/kernel/trace/fgraph.c index e35a941a5af3..47b461b1cf7e 100644 --- a/kernel/trace/fgraph.c +++ b/kernel/trace/fgraph.c @@ -381,7 +381,7 @@ int function_graph_enter(unsigned long ret, unsigned long func, if (gops == &fgraph_stub) continue; - if (gops->entryfunc(&trace)) + if (gops->entryfunc(&trace, gops)) bitmap |= BIT(i); } -- Steve