Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

tracing: Use atomic64_inc_return() in trace_clock_counter()

Use atomic64_inc_return(&ref) instead of atomic64_add_return(1, &ref)
to use optimized implementation and ease register pressure around
the primitive for targets that implement optimized variant.

Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: Masami Hiramatsu <mhiramat@kernel.org>
Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Link: https://lore.kernel.org/20241007085651.48544-1-ubizjak@gmail.com
Signed-off-by: Uros Bizjak <ubizjak@gmail.com>
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>

authored by

Uros Bizjak and committed by
Steven Rostedt (Google)
eb887c45 afe5960d

+1 -1
+1 -1
kernel/trace/trace_clock.c
··· 154 154 */ 155 155 u64 notrace trace_clock_counter(void) 156 156 { 157 - return atomic64_add_return(1, &trace_counter); 157 + return atomic64_inc_return(&trace_counter); 158 158 }