Re: [PATCH 19/20] function_graph: Use for_each_set_bit() in __ftrace_return_to_handler()

From: Steven Rostedt
Date: Sun May 26 2024 - 20:31:55 EST


On Mon, 27 May 2024 09:04:34 +0900
Masami Hiramatsu (Google) <mhiramat@xxxxxxxxxx> wrote:

> > bitmap = get_bitmap_bits(current, offset);
> > - for (i = 0; i < FGRAPH_ARRAY_SIZE; i++) {
> > +
> > + for_each_set_bit(i, &bitmap, sizeof(bitmap) * BITS_PER_BYTE) {
> > struct fgraph_ops *gops = fgraph_array[i];
> >
> > - if (!(bitmap & BIT(i)))
> > - continue;
> > if (gops == &fgraph_stub)
>
> Ah, nit: maybe this is unlikely()?

Ah probably. I'll update it.

Thanks,

-- Steve