Skip to content

Commit

Permalink
ring-buffer: Froce rb_update_write_stamp() to be inlined
Browse files Browse the repository at this point in the history
The function rb_update_write_stamp() is in the hotpath of the ring buffer
recording. Make sure that it is inlined as well. There's not many places
that call it.

Link: http://lkml.kernel.org/r/[email protected]

Reported-by: Andi Kleen <[email protected]>
Signed-off-by: Steven Rostedt <[email protected]>
  • Loading branch information
rostedt committed Nov 24, 2016
1 parent 2289d56 commit babe3fc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions kernel/trace/ring_buffer.c
Original file line number Diff line number Diff line change
Expand Up @@ -2486,7 +2486,7 @@ static inline void rb_event_discard(struct ring_buffer_event *event)
event->time_delta = 1;
}

static inline bool
static __always_inline bool
rb_event_is_commit(struct ring_buffer_per_cpu *cpu_buffer,
struct ring_buffer_event *event)
{
Expand All @@ -2500,7 +2500,7 @@ rb_event_is_commit(struct ring_buffer_per_cpu *cpu_buffer,
rb_commit_index(cpu_buffer) == index;
}

static void
static __always_inline void
rb_update_write_stamp(struct ring_buffer_per_cpu *cpu_buffer,
struct ring_buffer_event *event)
{
Expand Down

0 comments on commit babe3fc

Please sign in to comment.