Thread (8 messages) 8 messages, 2 authors, 8d ago

Re: [PATCH 1/4] tracing: add ref_trace_final_put tracepoint

From: Steven Rostedt <rostedt@goodmis.org>
Date: 2026-07-06 13:34:00
Also in: linux-mm, lkml

On Sun, 05 Jul 2026 07:19:20 +0800
Eugene Mavick [off-list ref] wrote:
quoted hunk ↗ jump to hunk
+++ b/lib/ref_trace.c
@@ -0,0 +1,12 @@
+// SPDX-License-Identifier: GPL-2.0
+#define CREATE_TRACE_POINTS
+#include <trace/events/ref_trace.h>
+
+//Wrapper function for functions defined entirely in header files
+void do_ref_trace_final_put(unsigned long caller, const char *fn, const void *obj)
+{
+	trace_ref_trace_final_put(caller, fn, obj);
+}
+EXPORT_SYMBOL_GPL(do_ref_trace_final_put);
Since this is only called when ref_trace_final_put tracepoint is enabled,
you can use the direct call that doesn't use the static_branch(). The above
should be:


//Wrapper function for functions defined entirely in header files
void do_ref_trace_final_put(unsigned long caller, const char *fn, const void *obj)
{
	trace_call__ref_trace_final_put(caller, fn, obj);
}


-- Steve
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help