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
Also in
bpf, lkml
Reply to
Masami Hiramatsu (Google), 2024-05-27
On Mon, 27 May 2024 09:04:34 +0900
Masami Hiramatsu (Google) [off-list ref] wrote:
quoted
 	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
Thread (37 messages) 37 messages, 2 authors, last reply 2024-06-02
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help