From: Steven Rostedt <rostedt@goodmis.org>
To: linux-kernel@vger.kernel.org
Cc: Ingo Molnar <mingo@kernel.org>,
Andrew Morton <akpm@linux-foundation.org>,
Frederic Weisbecker <fweisbec@gmail.com>
Subject: [PATCH 02/13 -next] ring-buffer: Remove unnecessary recusive call in rb_advance_iter()
Date: Mon, 21 Jan 2013 16:14:05 -0500 [thread overview]
Message-ID: <20130121211727.615543487@goodmis.org> (raw)
In-Reply-To: 20130121211403.337052956@goodmis.org
[-- Attachment #1: 0002-ring-buffer-Remove-unnecessary-recusive-call-in-rb_a.patch --]
[-- Type: text/plain, Size: 1263 bytes --]
From: Steven Rostedt <srostedt@redhat.com>
The original ring-buffer code had special checks at the start
of rb_advance_iter() and instead of repeating them again at the
end of the function if a certain condition existed, I just did
a recursive call to rb_advance_iter() because the special condition
would cause rb_advance_iter() to return early (after the checks).
But as things have changed, the special checks no longer exist
and the only thing done for the special_condition is to call
rb_inc_iter() and return. Instead of doing a confusing recursive call,
just call rb_inc_iter instead.
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 ce8514f..6ff9cc4 100644
--- a/kernel/trace/ring_buffer.c
+++ b/kernel/trace/ring_buffer.c
@@ -3425,7 +3425,7 @@ static void rb_advance_iter(struct ring_buffer_iter *iter)
/* check for end of page padding */
if ((iter->head >= rb_page_size(iter->head_page)) &&
(iter->head_page != cpu_buffer->commit_page))
- rb_advance_iter(iter);
+ rb_inc_iter(iter);
}
static int rb_lost_events(struct ring_buffer_per_cpu *cpu_buffer)
--
1.7.10.4
next prev parent reply other threads:[~2013-01-21 21:17 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-01-21 21:14 [PATCH 00/13 -next] [For linux-next] tracing: Review of changes Steven Rostedt
2013-01-21 21:14 ` [PATCH 01/13 -next] tracing: Fix sparse warning with is_signed_type() macro Steven Rostedt
2013-01-21 21:14 ` Steven Rostedt [this message]
2013-01-21 21:14 ` [PATCH 03/13 -next] tracing: Use this_cpu_ptr per-cpu helper Steven Rostedt
2013-01-21 21:14 ` [PATCH 04/13 -next] tracing: Verify target file before registering a uprobe event Steven Rostedt
2013-01-21 21:14 ` [PATCH 05/13 -next] tracing/syscalls: Make local functions static Steven Rostedt
2013-01-21 21:14 ` [PATCH 06/13 -next] tracing: Add checks if tr->buffer is NULL in tracing_reset{_online_cpus} Steven Rostedt
2013-01-21 21:14 ` [PATCH 07/13 -next] tracing: Remove unneeded check of max_tr->buffer before tracing_reset Steven Rostedt
2013-01-21 21:14 ` [PATCH 08/13 -next] tracing/lockdep: Disable lockdep first in entering NMI Steven Rostedt
2013-01-21 21:14 ` [PATCH 09/13 -next] tracing/fgraph: Add max_graph_depth to limit function_graph depth Steven Rostedt
2013-01-21 21:14 ` [PATCH 10/13 -next] ftrace: Move ARCH_SUPPORTS_FTRACE_SAVE_REGS in Kconfig Steven Rostedt
2013-01-21 21:14 ` [PATCH 11/13 -next] kprobes/x86: Move ftrace-based kprobe code into kprobes-ftrace.c Steven Rostedt
2013-01-21 21:14 ` [PATCH 12/13 -next] kprobes/x86: Move kprobes stuff under arch/x86/kernel/kprobes/ Steven Rostedt
2013-01-21 21:14 ` [PATCH 13/13 -next] tracing: Remove the extra 4 bytes of padding in events Steven Rostedt
2013-01-21 23:13 ` Arjan van de Ven
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20130121211727.615543487@goodmis.org \
--to=rostedt@goodmis.org \
--cc=akpm@linux-foundation.org \
--cc=fweisbec@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox