public inbox for linux-trace-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Mark Rutland <mark.rutland@arm.com>
To: Steven Rostedt <rostedt@goodmis.org>
Cc: linux-kernel@vger.kernel.org, linux-trace-kernel@vger.kernel.org,
	Masami Hiramatsu <mhiramat@kernel.org>,
	Mathieu Desnoyers <mathieu.desnoyers@efficios.com>,
	Andrew Morton <akpm@linux-foundation.org>
Subject: Re: [PATCH 2/5] ftrace: Comment __ftrace_hash_rec_update() and make filter_hash bool
Date: Wed, 5 Jun 2024 11:15:38 +0100	[thread overview]
Message-ID: <ZmA6ygUWNPkq0PKV@J2N7QTR9R3> (raw)
In-Reply-To: <20240604212854.725383717@goodmis.org>

On Tue, Jun 04, 2024 at 05:28:19PM -0400, Steven Rostedt wrote:
> From: "Steven Rostedt (Google)" <rostedt@goodmis.org>
> 
> The function __ftrace_hash_rec_update() parameter "filter_hash" is only
> used for true or false (boolean), but is of type int. It already has an
> "inc" parameter that is boolean. This is confusing, make "filter_hash"
> boolean as well.
> 
> While at it, add some documentation to that function especially since it
> holds the guts of the filtering logic of ftrace.
> 
> Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
> ---
>  kernel/trace/ftrace.c | 14 +++++++++++++-
>  1 file changed, 13 insertions(+), 1 deletion(-)
> 
> diff --git a/kernel/trace/ftrace.c b/kernel/trace/ftrace.c
> index 9dcdefe9d1aa..93c7c5fd4249 100644
> --- a/kernel/trace/ftrace.c
> +++ b/kernel/trace/ftrace.c
> @@ -1701,8 +1701,20 @@ static bool skip_record(struct dyn_ftrace *rec)
>  		!(rec->flags & FTRACE_FL_ENABLED);
>  }
>  
> +/*
> + * This is the main engine to the ftrace updates.
> + *
> + * It will iterate through all the available ftrace functions
> + * (the ones that ftrace can have callbacks to) and set the flags
> + * to the associated dyn_ftrace records.

I beleive s/to/in/ here, to make this one of:

	set the flags in the associated dyn_ftrace records.

... rather than:

	set the flags to the associated dyn_ftrace records.

> + *
> + * @filter_hash: True if for the filter hash is udpated, false for the
> + *               notrace hash

Typo: s/udpated/updated/

... though I couldn't parse this regardless; maybe:

	@filter_hash: true to update the filter hash, false to update
		      the notrace hash

Mark.

> + * @inc: True to add this hash, false to remove it (increment the
> + *       recorder counters or decrement them).
> + */
>  static bool __ftrace_hash_rec_update(struct ftrace_ops *ops,
> -				     int filter_hash,
> +				     bool filter_hash,
>  				     bool inc)
>  {
>  	struct ftrace_hash *hash;
> -- 
> 2.43.0
> 
> 

  reply	other threads:[~2024-06-05 10:15 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-04 21:28 [PATCH 0/5] ftrace: Clean up and comment code Steven Rostedt
2024-06-04 21:28 ` [PATCH 1/5] ftrace: Rename dup_hash() and comment it Steven Rostedt
2024-06-05 21:46   ` Masami Hiramatsu
2024-06-04 21:28 ` [PATCH 2/5] ftrace: Comment __ftrace_hash_rec_update() and make filter_hash bool Steven Rostedt
2024-06-05 10:15   ` Mark Rutland [this message]
2024-06-05 14:18     ` Steven Rostedt
2024-06-05 16:06       ` Steven Rostedt
2024-06-04 21:28 ` [PATCH 3/5] ftrace: Remove "filter_hash" parameter from ftrace_hash_rec_disable/enable() Steven Rostedt
2024-06-05 10:17   ` Mark Rutland
2024-06-05 18:05     ` Steven Rostedt
2024-06-05 21:50   ` Masami Hiramatsu
2024-06-05 21:54     ` Steven Rostedt
2024-06-04 21:28 ` [PATCH 4/5] ftrace: Convert "filter_hash" and "inc" to bool in ftrace_hash_rec_update_modify() Steven Rostedt
2024-06-05  1:12   ` kernel test robot
2024-06-05  1:57     ` Steven Rostedt
2024-06-05  5:15   ` kernel test robot
2024-06-05 10:22   ` Mark Rutland
2024-06-04 21:28 ` [PATCH 5/5] ftrace: Add comments to ftrace_hash_move() and friends Steven Rostedt

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ZmA6ygUWNPkq0PKV@J2N7QTR9R3 \
    --to=mark.rutland@arm.com \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-trace-kernel@vger.kernel.org \
    --cc=mathieu.desnoyers@efficios.com \
    --cc=mhiramat@kernel.org \
    --cc=rostedt@goodmis.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox