From mboxrd@z Thu Jan 1 00:00:00 1970 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 5C02429437; Wed, 14 Feb 2024 13:28:12 +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=1707917293; cv=none; b=cTCXfJGaFy3U5Na88XpRIJvhcPwHThoMZ2zklPbZu10TII9D1bNqFbIXX5eHIiBsgrQ6OGZyrYQa4XURUimiseFQgl8XK1U43JItt/dNIP8J7vUW2os3Y/R0dX00b7Cy0NxuCmo/bSWS6e/VV90+QR0DqWlZG6Ip5oQW2P5a/yE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707917293; c=relaxed/simple; bh=dr4fZY5Udf3n038yhYLKk5netrjQQ8WRTOzQbrzRkN0=; h=Date:From:To:Cc:Subject:Message-Id:In-Reply-To:References: Mime-Version:Content-Type; b=u1lnbzRAYwDFeshH4lVK2x/QYMKgORntMUxDmZXI5H8uNPtnB5QTblpw/nsq7GCe08CVbgptWxtB+pEfZD1VplCI7yqbi2Shr7xZ2/fRBUbLHbS35yuvCdUL3wNkcCFdkqU6TFIBCWkYCxlW3JH2YHGscYE8Jt+qtan+pVRs1vE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=iKyYENnD; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="iKyYENnD" Received: by smtp.kernel.org (Postfix) with ESMTPSA id BDC5DC433C7; Wed, 14 Feb 2024 13:28:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1707917292; bh=dr4fZY5Udf3n038yhYLKk5netrjQQ8WRTOzQbrzRkN0=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=iKyYENnDmyT7TVOrWZ0E6ri4G6N+j6LRxKcG4JKbe95j6S1iSABYaXNkelw41t0Lz 4mcjPsXhAG/kX6LMBrjKSpzFXQnK7G8Ud93esV1p6C2Ik/q8Nb6GhlG9g8SkkC9u3N C8MmXPHqMpaCBDf/Cb82cFU43Sy/noljjun5SNW6znjuu887+1bPy1Bf+fG7w1pejO 7i4vrSR/WhqSOIEo05C/pu+qOp0cUVYv6bCLlclcEDeuHx2eeNvP+g9zDyWKsdDmJe 9i2rRyUoEXCrVqiUVY8ojubWx35cS35mvWT6EQckvlnCDfbIkhljOdubqQuffqEyp8 egkIQIvtd/SIA== Date: Wed, 14 Feb 2024 22:28:06 +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 10/36] ftrace/function_graph: Pass fgraph_ops to function graph callbacks Message-Id: <20240214222806.0eaf984d4e56f791a3e1a697@kernel.org> In-Reply-To: <20240213204218.0673fbb0@gandalf.local.home> References: <170723204881.502590.11906735097521170661.stgit@devnote2> <170723216124.502590.13855631208872523552.stgit@devnote2> <20240213204218.0673fbb0@gandalf.local.home> X-Mailer: Sylpheed 3.7.0 (GTK+ 2.24.33; x86_64-pc-linux-gnu) Precedence: bulk X-Mailing-List: linux-trace-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 Tue, 13 Feb 2024 20:42:18 -0500 Steven Rostedt wrote: > 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: Thanks for pointing it out! Let me fix this in next version. > > 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 > -- Masami Hiramatsu (Google)