From: Steven Rostedt <rostedt@goodmis.org>
To: linux-kernel@vger.kernel.org
Cc: Ingo Molnar <mingo@elte.hu>, Andrew Morton <akpm@linux-foundation.org>
Subject: [PATCH 1/5] ring-buffer: remove type parameter from rb_reserve_next_event
Date: Tue, 12 May 2009 00:08:33 -0400 [thread overview]
Message-ID: <20090512041058.932896238@goodmis.org> (raw)
In-Reply-To: 20090512040832.681953177@goodmis.org
[-- Attachment #1: 0001-ring-buffer-remove-type-parameter-from-rb_reserve_n.patch --]
[-- Type: text/plain, Size: 2003 bytes --]
From: Steven Rostedt <srostedt@redhat.com>
The rb_reserve_next_event is only called for the data type (type = 0).
There is no reason to pass in the type to the function.
Before:
text data bss dec hex filename
16554 24 12 16590 40ce kernel/trace/ring_buffer.o
After:
text data bss dec hex filename
16538 24 12 16574 40be kernel/trace/ring_buffer.o
[ Impact: cleaner, smaller and slightly more efficient code ]
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
---
kernel/trace/ring_buffer.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/kernel/trace/ring_buffer.c b/kernel/trace/ring_buffer.c
index 3611706..fe40f6c 100644
--- a/kernel/trace/ring_buffer.c
+++ b/kernel/trace/ring_buffer.c
@@ -1389,7 +1389,7 @@ rb_add_time_stamp(struct ring_buffer_per_cpu *cpu_buffer,
static struct ring_buffer_event *
rb_reserve_next_event(struct ring_buffer_per_cpu *cpu_buffer,
- unsigned type, unsigned long length)
+ unsigned long length)
{
struct ring_buffer_event *event;
u64 ts, delta;
@@ -1448,7 +1448,7 @@ rb_reserve_next_event(struct ring_buffer_per_cpu *cpu_buffer,
/* Non commits have zero deltas */
delta = 0;
- event = __rb_reserve_next(cpu_buffer, type, length, &ts);
+ event = __rb_reserve_next(cpu_buffer, 0, length, &ts);
if (PTR_ERR(event) == -EAGAIN)
goto again;
@@ -1556,7 +1556,7 @@ ring_buffer_lock_reserve(struct ring_buffer *buffer, unsigned long length)
if (length > BUF_PAGE_SIZE)
goto out;
- event = rb_reserve_next_event(cpu_buffer, 0, length);
+ event = rb_reserve_next_event(cpu_buffer, length);
if (!event)
goto out;
@@ -1782,7 +1782,7 @@ int ring_buffer_write(struct ring_buffer *buffer,
goto out;
event_length = rb_calculate_event_length(length);
- event = rb_reserve_next_event(cpu_buffer, 0, event_length);
+ event = rb_reserve_next_event(cpu_buffer, event_length);
if (!event)
goto out;
--
1.6.2.4
--
next prev parent reply other threads:[~2009-05-12 4:11 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-05-12 4:08 [PATCH 0/5] [GIT PULL] ring-buffer: optimize to 17% performance increase Steven Rostedt
2009-05-12 4:08 ` Steven Rostedt [this message]
2009-05-12 4:08 ` [PATCH 2/5] ring-buffer: move calculation of event length Steven Rostedt
2009-05-12 4:08 ` [PATCH 3/5] ring-buffer: small optimizations Steven Rostedt
2009-05-12 4:08 ` [PATCH 4/5] ring-buffer: use internal time stamp function Steven Rostedt
2009-05-12 4:08 ` [PATCH 5/5] ring-buffer: move code around to remove some branches Steven Rostedt
2009-05-12 8:33 ` [PATCH 0/5] [GIT PULL] ring-buffer: optimize to 17% performance increase Ingo Molnar
2009-05-12 13:27 ` Steven Rostedt
2009-05-12 14:25 ` Steven Rostedt
2009-05-12 14:28 ` Steven Rostedt
2009-05-12 14:33 ` Ingo Molnar
2009-05-13 13:44 ` Steven Rostedt
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=20090512041058.932896238@goodmis.org \
--to=rostedt@goodmis.org \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.