diff options
author | Ingo Molnar <mingo@kernel.org> | 2012-07-06 11:12:17 +0200 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2012-07-06 11:12:17 +0200 |
commit | 35c2f48c66d9c1b8d794c3936c3be22aa7c89adb (patch) | |
tree | de0233d45fec273920bce0bc8640465cbf439600 /kernel/trace/ring_buffer.c | |
parent | 47fbc518a4b5c9a949f7cab8b14a00d3549bf138 (diff) | |
parent | a5fb833172eca69136e9ee1ada778e404086ab8a (diff) | |
download | linux-35c2f48c66d9c1b8d794c3936c3be22aa7c89adb.tar.bz2 |
Merge branch 'tip/perf/core' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace into perf/core
Pull tracing updates from Steve Rostedt.
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'kernel/trace/ring_buffer.c')
-rw-r--r-- | kernel/trace/ring_buffer.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/kernel/trace/ring_buffer.c b/kernel/trace/ring_buffer.c index 1d0f6a8a0e5e..82a3e0c56b1d 100644 --- a/kernel/trace/ring_buffer.c +++ b/kernel/trace/ring_buffer.c @@ -3239,6 +3239,10 @@ rb_get_reader_page(struct ring_buffer_per_cpu *cpu_buffer) if (cpu_buffer->commit_page == cpu_buffer->reader_page) goto out; + /* Don't bother swapping if the ring buffer is empty */ + if (rb_num_of_entries(cpu_buffer) == 0) + goto out; + /* * Reset the reader page to size zero. */ |