lkml.org 
[lkml]   [2024]   [Feb]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v7 22/36] function_graph: Add a new entry handler with parent_ip and ftrace_regs
On Wed,  7 Feb 2024 00:11:34 +0900
"Masami Hiramatsu (Google)" <mhiramat@kernel.org> wrote:

> From: Masami Hiramatsu (Google) <mhiramat@kernel.org>
>
> 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) <mhiramat@kernel.org>
> ---

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

\
 
 \ /
  Last update: 2024-05-27 15:05    [W:0.747 / U:0.144 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site