Skip to contentSkip to conversation

function_graph: no need to invoke the function call_filter_check_discard

PATCH In review Donglin Peng 2 participants 2 messages Oct 10, 2024 Tracing

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 function_graph: no need to invoke the function call_filter_check_discard

From: Donglin Peng <[email protected]>

The function call_filter_check_discard has been removed in the commit [1].

[1] https://lore.kernel.org/all/[email protected]/

---
 kernel/trace/trace_functions_graph.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
kernel/trace/trace_functions_graph.c +1 -2
index 3b210e6bcd70..98f347c049d2 100644
@@ -148,8 +148,7 @@ int __trace_graph_retaddr_entry(struct trace_array *tr,
 	entry->graph_ent.func = trace->func;
 	entry->graph_ent.depth = trace->depth;
 	entry->graph_ent.retaddr = retaddr;
-	if (!call_filter_check_discard(call, entry, buffer, event))
-		trace_buffer_unlock_commit_nostack(buffer, event);
+	trace_buffer_unlock_commit_nostack(buffer, event);
 
 	return 1;
 }
Signature · 1 line
2.25.1
maintainer
#1 lore raw
Quoted 17 lines · On Thu, 10 Oct 2024 11:58:26 +0800 Donglin Peng <[email protected]> wrote:

From: Donglin Peng <[email protected]>

The function call_filter_check_discard has been removed in the commit [1].

[1] https://lore.kernel.org/all/[email protected]/

---
 kernel/trace/trace_functions_graph.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
kernel/trace/trace_functions_graph.c +0 -0
index 3b210e6bcd70..98f347c049d2 100644

kernel/trace/trace_functions_graph.c int __trace_graph_retaddr_entry(struct trace_array *tr, · line 154

Quoted 9 lines
kernel/trace/trace_functions_graph.c +1 -2
@@ -148,8 +148,7 @@ int __trace_graph_retaddr_entry(struct trace_array *tr,
 	entry->graph_ent.func = trace->func;
 	entry->graph_ent.depth = trace->depth;
 	entry->graph_ent.retaddr = retaddr;
-	if (!call_filter_check_discard(call, entry, buffer, event))
-		trace_buffer_unlock_commit_nostack(buffer, event);
+	trace_buffer_unlock_commit_nostack(buffer, event);
 
 	return 1;
 }

This still fails:

kernel/trace/trace_functions_graph.c:140:27: error: unused variable 'call' [-Werror,-Wunused-variable]
140 | struct trace_event_call *call = &event_fgraph_retaddr_entry;
| ^~~~
1 error generated.

I'll just fix it up.

Thanks,

-- Steve