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

Steven Rostedt
2024-05-27T00:31:42Z

On Mon, 27 May 2024 09:04:34 +0900
Masami Hiramatsu (Google) <mhiramat@kernel.org> 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