History

ring-buffer: Make rb_reserve_next_event() always inlined

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

Steven Rostedt (Red Hat) committed 9 years ago

Commit fa7ffb31 parent 3e9a8aa1 file · +1 −1Browse files

Showing the changes to kernel/trace (1 of 1 file). Show all

Unified · Split

kernel/trace/ring_buffer.c+1−1
@@ -2733,7 +2733,7 @@ __rb_reserve_next(struct ring_buffer_per_cpu *cpu_buffer, · 2732 unmodified lines
27332733 return event;
27342734 }
27352735
2736−static struct ring_buffer_event *
2736+static __always_inline struct ring_buffer_event *
27372737 rb_reserve_next_event(struct ring_buffer *buffer,
27382738 struct ring_buffer_per_cpu *cpu_buffer,
27392739 unsigned long length)

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t