]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
ring-buffer: Froce rb_update_write_stamp() to be inlined
authorSteven Rostedt (Red Hat) <rostedt@goodmis.org>
Thu, 24 Nov 2016 01:38:39 +0000 (20:38 -0500)
committerSteven Rostedt <rostedt@goodmis.org>
Thu, 24 Nov 2016 01:38:39 +0000 (20:38 -0500)
The function rb_update_write_stamp() is in the hotpath of the ring buffer
recording. Make sure that it is inlined as well. There's not many places
that call it.

Link: http://lkml.kernel.org/r/20161121183700.GW26852@two.firstfloor.org
Reported-by: Andi Kleen <andi@firstfloor.org>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
kernel/trace/ring_buffer.c

index 04068c0ed927a4e0429a3c534f34aabfbdc51cea..04579a0c7711362b3bc4ced4116f2ffa647a3375 100644 (file)
@@ -2486,7 +2486,7 @@ static inline void rb_event_discard(struct ring_buffer_event *event)
                event->time_delta = 1;
 }
 
-static inline bool
+static __always_inline bool
 rb_event_is_commit(struct ring_buffer_per_cpu *cpu_buffer,
                   struct ring_buffer_event *event)
 {
@@ -2500,7 +2500,7 @@ rb_event_is_commit(struct ring_buffer_per_cpu *cpu_buffer,
                rb_commit_index(cpu_buffer) == index;
 }
 
-static void
+static __always_inline void
 rb_update_write_stamp(struct ring_buffer_per_cpu *cpu_buffer,
                      struct ring_buffer_event *event)
 {