Re: [PATCH v2 10/27] ftrace: Add subops logic to allow one ops to manage many

2024-06-03 Thread Steven Rostedt
On Mon, 3 Jun 2024 11:46:36 +0900 Masami Hiramatsu (Google) wrote: > > > at the beginning of the loop. > > > Also, at the end of the loop, > > > > > > if (ftrace_hash_empty(new_hash)) { > > > free_ftrace_hash(new_hash); > > > new_hash = EMPTY_HASH; > > > break; > > > } > > And we still

Re: [PATCH v2 10/27] ftrace: Add subops logic to allow one ops to manage many

2024-06-03 Thread Steven Rostedt
On Mon, 3 Jun 2024 11:46:36 +0900 Masami Hiramatsu (Google) wrote: > > > if (ftrace_hash_empty(new_hash)) { > > > free_ftrace_hash(new_hash); > > > new_hash = EMPTY_HASH; > > > break; > > > } > > And we still need this (I think this should be done in intersect_hash(), we > just > need t

Re: [PATCH v2 10/27] ftrace: Add subops logic to allow one ops to manage many

2024-06-02 Thread Google
On Sun, 2 Jun 2024 22:06:13 -0400 Steven Rostedt wrote: > > > +/* Make @ops trace evenything except what all its subops do not trace */ > > > +static struct ftrace_hash *intersect_hashes(struct ftrace_ops *ops) > > > +{ > > > + struct ftrace_hash *new_hash = NULL; > > > + struct ftrace_ops *subop

Re: [PATCH v2 10/27] ftrace: Add subops logic to allow one ops to manage many

2024-06-02 Thread Steven Rostedt
On Mon, 3 Jun 2024 10:33:16 +0900 Masami Hiramatsu (Google) wrote: > Hi Steve, > > On Sat, 01 Jun 2024 23:37:54 -0400 > Steven Rostedt wrote: > > > From: "Steven Rostedt (VMware)" > > I think this is a new patch, correct? I'm a bit confused. Ah, good catch! I originally started writing t

Re: [PATCH v2 10/27] ftrace: Add subops logic to allow one ops to manage many

2024-06-02 Thread Google
Hi Steve, On Sat, 01 Jun 2024 23:37:54 -0400 Steven Rostedt wrote: > From: "Steven Rostedt (VMware)" I think this is a new patch, correct? I'm a bit confused. And I have some comments below; [..] > @@ -3164,6 +3166,392 @@ int ftrace_shutdown(struct ftrace_ops *ops, int > command) > ret

[PATCH v2 10/27] ftrace: Add subops logic to allow one ops to manage many

2024-06-01 Thread Steven Rostedt
From: "Steven Rostedt (VMware)" There are cases where a single system will use a single function callback to handle multiple users. For example, to allow function_graph tracer to have multiple users where each can trace their own set of functions, it is useful to only have one ftrace_ops register