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 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-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 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