From: Steven Rostedt <rostedt@goodmis.org>
To: LKML <linux-kernel@vger.kernel.org>
Cc: Arjan van de Ven <arjan@linux.intel.com>,
Linus Torvalds <torvalds@linux-foundation.org>,
Ingo Molnar <mingo@elte.hu>,
Frederic Weisbecker <fweisbec@gmail.com>,
David Sharp <dhsharp@google.com>,
Vaibhav Nagarnaik <vnagarnaik@google.com>,
Peter Zijlstra <peterz@infradead.org>,
Andrew Morton <akpm@linux-foundation.org>
Subject: [RFC][PATCH v2] tracing: Remove useless 4 bytes of padding from every event
Date: Wed, 16 May 2012 13:24:25 -0400 [thread overview]
Message-ID: <1337189065.6724.55.camel@gandalf.stny.rr.com> (raw)
In-Reply-To: <1337175871.6724.46.camel@gandalf.stny.rr.com>
On Wed, 2012-05-16 at 09:44 -0400, Steven Rostedt wrote:
> Now that PowerTop v2 is out, which uses the parse-event library, it no
> longer is broken by the removal of the lock-depth field from every
> event. Currently we add 4 bytes of empty space to every event. If we
> have 1 million events, 4 million bytes are wasted in the ring buffers
> (for both ftrace and perf).
>
> But this change will break PowerTop v1. Thus my question is, how long do
> we need to keep this wasted space in the ring buffers to satisfy an out
> of date tool?
>
Would help if I compiled it :-)
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
diff --git a/include/linux/ftrace_event.h b/include/linux/ftrace_event.h
index 5f3f3be..f96dfef 100644
--- a/include/linux/ftrace_event.h
+++ b/include/linux/ftrace_event.h
@@ -49,7 +49,6 @@ struct trace_entry {
unsigned char flags;
unsigned char preempt_count;
int pid;
- int padding;
};
#define FTRACE_MAX_EVENT \
diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c
index 08a08ba..0960aa7 100644
--- a/kernel/trace/trace.c
+++ b/kernel/trace/trace.c
@@ -1145,7 +1145,6 @@ tracing_generic_entry_update(struct trace_entry *entry, unsigned long flags,
entry->preempt_count = pc & 0xff;
entry->pid = (tsk) ? tsk->pid : 0;
- entry->padding = 0;
entry->flags =
#ifdef CONFIG_TRACE_IRQFLAGS_SUPPORT
(irqs_disabled_flags(flags) ? TRACE_FLAG_IRQS_OFF : 0) |
diff --git a/kernel/trace/trace_events.c b/kernel/trace/trace_events.c
index 079a93a..5845731 100644
--- a/kernel/trace/trace_events.c
+++ b/kernel/trace/trace_events.c
@@ -116,7 +116,6 @@ static int trace_define_common_fields(void)
__common_field(unsigned char, flags);
__common_field(unsigned char, preempt_count);
__common_field(int, pid);
- __common_field(int, padding);
return ret;
}
next prev parent reply other threads:[~2012-05-16 17:24 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-05-16 13:44 [RFC][PATCH] " Steven Rostedt
2012-05-16 17:24 ` Steven Rostedt [this message]
2012-05-16 19:33 ` Linus Torvalds
2012-05-16 19:36 ` Arjan van de Ven
2012-05-16 19:47 ` Steven Rostedt
2012-05-16 19:51 ` Linus Torvalds
2012-05-16 20:03 ` Steven Rostedt
2012-05-17 8:04 ` Ingo Molnar
2012-05-16 20:00 ` Steven Rostedt
2012-05-16 20:04 ` Linus Torvalds
2012-05-16 20:07 ` Arjan van de Ven
2012-05-16 20:13 ` Steven Rostedt
2012-05-16 20:14 ` Dave Jones
2012-05-16 20:16 ` Arjan van de Ven
2012-05-17 8:06 ` Ingo Molnar
2012-05-17 12:11 ` 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=1337189065.6724.55.camel@gandalf.stny.rr.com \
--to=rostedt@goodmis.org \
--cc=akpm@linux-foundation.org \
--cc=arjan@linux.intel.com \
--cc=dhsharp@google.com \
--cc=fweisbec@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=peterz@infradead.org \
--cc=torvalds@linux-foundation.org \
--cc=vnagarnaik@google.com \
/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
all inboxes | Powered by JetHome®