[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240605120657.1c8938ee@gandalf.local.home>
Date: Wed, 5 Jun 2024 12:06:57 -0400
From: Steven Rostedt <rostedt@...dmis.org>
To: Mark Rutland <mark.rutland@....com>
Cc: linux-kernel@...r.kernel.org, linux-trace-kernel@...r.kernel.org, Masami
Hiramatsu <mhiramat@...nel.org>, Mathieu Desnoyers
<mathieu.desnoyers@...icios.com>, Andrew Morton <akpm@...ux-foundation.org>
Subject: Re: [PATCH 2/5] ftrace: Comment __ftrace_hash_rec_update() and make
filter_hash bool
On Wed, 5 Jun 2024 10:18:32 -0400
Steven Rostedt <rostedt@...dmis.org> wrote:
> > > + *
> > > + * @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
>
> Sure.
Actually, they are both wrong. Because I realized your's was not correct, I
started describing it in more detail and realized it does basically the
same thing (but differently) if filter_hash is set or not. I think it can
be removed completely!
I just tried it. I forced "filter_hash" to always be true, and all the
tests worked just fine. This function is only to update the dyn_ftrace
records when an ops is added or removed. It doesn't matter which filter is
being used, as they are both necessary for the update.
This will make that code a bit cleaner and simpler. Let me go and fix that
first, and then add the documentation on top!
This is what happens when you document your code :-p
This code has been rewritten a few times. When it was first written, which
filter was being changed may have been important. But now it is not.
-- Steve
Powered by blists - more mailing lists