aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/trace/ring_buffer.c
diff options
context:
space:
mode:
authorSteven Rostedt (Red Hat) <rostedt@goodmis.org>2016-11-23 20:42:31 -0500
committerSteven Rostedt <rostedt@goodmis.org>2016-11-23 20:42:31 -0500
commit38e11df134297ea3860c7aad8263ece27db01308 (patch)
treec800e9fb51d142fa2b1a56935a2d387fe3a935e2 /kernel/trace/ring_buffer.c
parentbabe3fce95e6490b88a2a21d90eb4ba9884edb82 (diff)
ring-buffer: Force rb_end_commit() and rb_set_commit_to_write() inline
Both rb_end_commit() and rb_set_commit_to_write() are in the fast path of the ring buffer recording. Make sure they are always inlined. 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>
Diffstat (limited to 'kernel/trace/ring_buffer.c')
-rw-r--r--kernel/trace/ring_buffer.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/kernel/trace/ring_buffer.c b/kernel/trace/ring_buffer.c
index 04579a0c7711..f17476f9d7f4 100644
--- a/kernel/trace/ring_buffer.c
+++ b/kernel/trace/ring_buffer.c
@@ -2386,7 +2386,7 @@ static void rb_start_commit(struct ring_buffer_per_cpu *cpu_buffer)
2386 local_inc(&cpu_buffer->commits); 2386 local_inc(&cpu_buffer->commits);
2387} 2387}
2388 2388
2389static void 2389static __always_inline void
2390rb_set_commit_to_write(struct ring_buffer_per_cpu *cpu_buffer) 2390rb_set_commit_to_write(struct ring_buffer_per_cpu *cpu_buffer)
2391{ 2391{
2392 unsigned long max_count; 2392 unsigned long max_count;
@@ -2441,7 +2441,7 @@ rb_set_commit_to_write(struct ring_buffer_per_cpu *cpu_buffer)
2441 goto again; 2441 goto again;
2442} 2442}
2443 2443
2444static inline void rb_end_commit(struct ring_buffer_per_cpu *cpu_buffer) 2444static __always_inline void rb_end_commit(struct ring_buffer_per_cpu *cpu_buffer)
2445{ 2445{
2446 unsigned long commits; 2446 unsigned long commits;
2447 2447