Re: [PATCH v2 0/5] ftrace: Clean up and comment code

From: Google
Date: Wed Jun 05 2024 - 19:45:17 EST


On Wed, 05 Jun 2024 14:03:34 -0400
Steven Rostedt <rostedt@xxxxxxxxxxx> wrote:

> While working on the function_graph multiple users code, I realized
> that I was struggling with how the ftrace code worked. Being the
> author of such code meant that it wasn't very intuitive. Namely, the
> function names were not descriptive enough, or at least, they needed
> comments.
>
> This series moves to solve some of that via changing a couple function
> names and parameters and adding comments to many of them.
>

This series looks good to me.

Acked-by: Masami Hiramatsu (Google) <mhiramat@xxxxxxxxxx>

for this series.

Thanks!

> There's more to do, but this at least moves it in the right direction.
>
> Changes since v1: https://lore.kernel.org/all/20240604212817.384103202@xxxxxxxxxxx/
>
> - While working on v1 and responding to a comment from Mark Rutland about
> the usage of "ftrace_hash" in the __ftrace_hash_rec_update() code,
> I realized that the function does pretty much the same thing if
> it is set or not set (but slightly differently). It turns out that
> it isn't needed and that parameter can be removed, making the code
> simpler.
>
> - Fixed some wording and typos suggested by Mark Rutland.
>
> Steven Rostedt (Google) (5):
> ftrace: Rename dup_hash() and comment it
> ftrace: Remove "ftrace_hash" parameter from __ftrace_hash_rec_update()
> ftrace: Add comments to ftrace_hash_rec_disable/enable()
> ftrace: Convert "inc" parameter to bool in ftrace_hash_rec_update_modify()
> ftrace: Add comments to ftrace_hash_move() and friends
>
> ----
> kernel/trace/ftrace.c | 161 +++++++++++++++++++++++++++++---------------------
> 1 file changed, 94 insertions(+), 67 deletions(-)


--
Masami Hiramatsu (Google) <mhiramat@xxxxxxxxxx>