]> www.infradead.org Git - users/jedix/linux-maple.git/commit
tracepoint: Reduce duplication of __DO_TRACE_CALL
authorAlice Ryhl <aliceryhl@google.com>
Thu, 12 Dec 2024 13:12:37 +0000 (13:12 +0000)
committerSteven Rostedt (Google) <rostedt@goodmis.org>
Thu, 26 Dec 2024 15:38:37 +0000 (10:38 -0500)
commitcff6d93eab00bacf8b6bffdef775fc2de0273c96
tree27391463b74d16cf51e7a8a58c5b3c56cc922eb9
parent9e49ca756d207f4313fb7af48648a67da8e4e250
tracepoint: Reduce duplication of __DO_TRACE_CALL

The logic for invoking __DO_TRACE_CALL was extracted to a static inline
function called __rust_do_trace_##name so that Rust can call it
directly. This logic does not include the static branch, to avoid a
function call when the tracepoint is disabled.

Since the C code needs to perform the same logic after checking the
static key, this logic is currently duplicated. Thus, remove this
duplication by having C call the static inline function too.

Cc: Masami Hiramatsu <mhiramat@kernel.org>
Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Link: https://lore.kernel.org/20241212131237.1988409-1-aliceryhl@google.com
Signed-off-by: Alice Ryhl <aliceryhl@google.com>
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
include/linux/tracepoint.h