History

ring-buffer: Always inline rb_event_data()

The rb_event_data() is the fast path of getting the ring buffer data from an event. Externally, ring_buffer_event_data() is used to access this function. But unfortunately, rb_event_data() is not inlined, and calling ring_buffer_event_data() causes that function to be called again. Force rb_event_data() to be inlined to lower the number of operations needed when calling ring_buffer_event_data(). Link: http://lkml.kernel.org/r/20161121183700.GW26852@two.firstfloor.org

Steven Rostedt (Red Hat) committed 9 years ago

Commit 929ddbf1 parent fa7ffb31 file · +1 −1Browse files

Unified · Split

kernel/trace/ring_buffer.c+1−1
@@ -245,7 +245,7 @@ unsigned ring_buffer_event_length(struct ring_buffer_event *event) · 244 unmodified lines
245EXPORT_SYMBOL_GPL(ring_buffer_event_length);245EXPORT_SYMBOL_GPL(ring_buffer_event_length);
246 246
247/* inline for ring buffer fast paths */247/* inline for ring buffer fast paths */
248static void *248static __always_inline void *
249rb_event_data(struct ring_buffer_event *event)249rb_event_data(struct ring_buffer_event *event)
250{250{
251 if (event->type_len == RINGBUF_TYPE_TIME_EXTEND)251 if (event->type_len == RINGBUF_TYPE_TIME_EXTEND)

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