# Re: \[PATCH 1/4\] tracing: add ref\_trace\_final\_put tracepoint

- From: Steven Rostedt \<rostedt@goodmis.org\>
- Date: 2026-07-06 13:34:00 
- List: linux-trace-kernel
- Page: https://ratatoskr.run/linux-trace-kernel/2026/07/17219244
- Thread: https://ratatoskr.run/linux-trace-kernel/2026/07/17217114/t.md

```text
On Sun, 05 Jul 2026 07:19:20 +0800
Eugene Mavick [ref] wrote:

> +++ 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
```
