# Re: \[PATCH 19/20\] function\_graph: Use for\_each\_set\_bit() in \_\_ftrace\_return\_to\_handler()

- From: Steven Rostedt \<rostedt@goodmis.org\>
- Date: 2024-05-27 00:31:42 
- List: linux-trace-kernel
- Page: https://ratatoskr.run/linux-trace-kernel/2024/05/2614844
- Thread: https://ratatoskr.run/linux-trace-kernel/2024/05/2614213/t.md

```text
On Mon, 27 May 2024 09:04:34 +0900
Masami Hiramatsu (Google) [ref] 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

```
