projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
babe3fc
)
ring-buffer: Force rb_end_commit() and rb_set_commit_to_write() inline
author
Steven Rostedt (Red Hat)
<rostedt@goodmis.org>
Thu, 24 Nov 2016 01:42:31 +0000
(20:42 -0500)
committer
Steven Rostedt
<rostedt@goodmis.org>
Thu, 24 Nov 2016 01:42:31 +0000
(20:42 -0500)
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>
kernel/trace/ring_buffer.c
patch
|
blob
|
history
diff --git
a/kernel/trace/ring_buffer.c
b/kernel/trace/ring_buffer.c
index 04579a0c7711362b3bc4ced4116f2ffa647a3375..f17476f9d7f481a63361be2db73eefaaaaeed238 100644
(file)
--- 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)
local_inc(&cpu_buffer->commits);
}
-static void
+static
__always_inline
void
rb_set_commit_to_write(struct ring_buffer_per_cpu *cpu_buffer)
{
unsigned long max_count;
@@
-2441,7
+2441,7
@@
rb_set_commit_to_write(struct ring_buffer_per_cpu *cpu_buffer)
goto again;
}
-static inline void rb_end_commit(struct ring_buffer_per_cpu *cpu_buffer)
+static
__always_
inline void rb_end_commit(struct ring_buffer_per_cpu *cpu_buffer)
{
unsigned long commits;