Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1532410
| From | Steven Rostedt <rostedt@goodmis.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [for-next][PATCH 2/8] ring-buffer: Make rb_reserve_next_event() always inlined |
| Date | 2016-11-29 16:20 +0100 |
| Message-ID | <sISmm-1He-13@gated-at.bofh.it> (permalink) |
| References | <sIScF-1DN-9@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
From: "Steven Rostedt (Red Hat)" <rostedt@goodmis.org> The function rb_reserved_next_event() is called by two functions: ring_buffer_lock_reserve() and ring_buffer_write(). This is in a very hot path of the tracing code, and it is best that they are not functions. The two callers are basically wrapers for rb_reserver_next_event(). Removing the function calls can save execution time in the hotpath of tracing. 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 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/trace/ring_buffer.c b/kernel/trace/ring_buffer.c index 9c143739b8d7..1f3580cee6cc 100644 --- a/kernel/trace/ring_buffer.c +++ b/kernel/trace/ring_buffer.c @@ -2733,7 +2733,7 @@ __rb_reserve_next(struct ring_buffer_per_cpu *cpu_buffer, return event; } -static struct ring_buffer_event * +static __always_inline struct ring_buffer_event * rb_reserve_next_event(struct ring_buffer *buffer, struct ring_buffer_per_cpu *cpu_buffer, unsigned long length) -- 2.10.2
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
[for-next][PATCH 0/8] tracing: Some micro optimizations Steven Rostedt <rostedt@goodmis.org> - 2016-11-29 16:20 +0100 [for-next][PATCH 6/8] ring-buffer: Force inline of hotpath helper functions Steven Rostedt <rostedt@goodmis.org> - 2016-11-29 16:20 +0100 [for-next][PATCH 3/8] ring-buffer: Always inline rb_event_data() Steven Rostedt <rostedt@goodmis.org> - 2016-11-29 16:20 +0100 [for-next][PATCH 5/8] tracing: Make __buffer_unlock_commit() always_inline Steven Rostedt <rostedt@goodmis.org> - 2016-11-29 16:20 +0100 [for-next][PATCH 2/8] ring-buffer: Make rb_reserve_next_event() always inlined Steven Rostedt <rostedt@goodmis.org> - 2016-11-29 16:20 +0100
csiph-web