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

From: Steven Rostedt
Date: Mon Jun 03 2024 - 13:04:09 EST


On Mon, 3 Jun 2024 11:46:36 +0900
Masami Hiramatsu (Google) <mhiramat@xxxxxxxxxx> 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 need this (I think this should be done in intersect_hash(), we just
> need to count the number of entries.)

Ah, I see. if it ends with nothing intersecting it should be empty. I added:

/* If nothing intersects, make it the empty set */
if (ftrace_hash_empty(*hash)) {
free_ftrace_hash(*hash);
*hash = EMPTY_HASH;
}

to the end of intersect_hash().

-- Steve