From: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
To: Steven Rostedt <rostedt@goodmis.org>
Cc: linux-kernel@vger.kernel.org, Ingo Molnar <mingo@elte.hu>,
Andrew Morton <akpm@linux-foundation.org>,
Thomas Gleixner <tglx@linutronix.de>,
Peter Zijlstra <peterz@infradead.org>,
Frederic Weisbecker <fweisbec@gmail.com>,
Arnaldo Carvalho de Melo <acme@redhat.com>,
Lai Jiangshan <laijs@cn.fujitsu.com>,
Li Zefan <lizf@cn.fujitsu.com>,
Masami Hiramatsu <mhiramat@redhat.com>,
Christoph Hellwig <hch@lst.de>
Subject: Re: [PATCH 10/10 -v3][RFC] tracing: Combine event filter_active and enable into single flags field
Date: Mon, 10 May 2010 23:30:27 -0400 [thread overview]
Message-ID: <20100511033026.GA28162@Krystal> (raw)
In-Reply-To: <20100511030911.927339838@goodmis.org>
* Steven Rostedt (rostedt@goodmis.org) wrote:
> From: Steven Rostedt <srostedt@redhat.com>
>
> The filter_active and enable both use an int (4 bytes each) to
> set a single flag. We can save 4 bytes per event by combining the
> two into a single integer.
>
> text data bss dec hex filename
> 5788186 1337252 9351592 16477030 fb6b66 vmlinux.orig
> 5761074 1262596 9351592 16375262 f9ddde vmlinux.id
> 5761007 1256916 9351592 16369515 f9c76b vmlinux.flags
>
> This gives us another 5K in savings.
>
> The modification of both the enable and filter fields are done
> under the event_mutex, so it is still safe to combine the two.
>
> Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
> ---
[...]
> struct ftrace_event_call {
> struct list_head list;
> struct ftrace_event_class *class;
> @@ -154,8 +164,15 @@ struct ftrace_event_call {
> void *mod;
> void *data;
>
> - int enabled;
> - int filter_active;
> + /*
> + * 32 bit flags:
> + * bit 1: enabled
> + * bit 2: filter_active
> + *
> + * Must hold event_mutex to change.
> + */
> + unsigned int flags;
> +
I would also comment about flags read-side:
* Flags are read concurrently without locking.
Besides that minor nit, the whole patchset has my
Acked-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Thanks!
Mathieu
--
Mathieu Desnoyers
Operating System Efficiency R&D Consultant
EfficiOS Inc.
http://www.efficios.com
next prev parent reply other threads:[~2010-05-11 3:30 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-05-11 3:00 [PATCH 00/10 -v3][RFC] tracing: Lowering the footprint of TRACE_EVENTs Steven Rostedt
2010-05-11 3:00 ` [PATCH 01/10 -v3][RFC] tracing: Create class struct for events Steven Rostedt
2010-05-11 3:00 ` [PATCH 02/10 -v3][RFC] tracepoints: Add check trace callback type Steven Rostedt
2010-05-11 3:00 ` [PATCH 03/10 -v3][RFC] tracing: Let tracepoints have data passed to tracepoint callbacks Steven Rostedt
2010-05-11 3:00 ` [PATCH 04/10 -v3][RFC] tracing: Remove per event trace registering Steven Rostedt
2010-05-11 3:00 ` [PATCH 05/10 -v3][RFC] tracing: Move fields from event to class structure Steven Rostedt
2010-05-11 3:00 ` [PATCH 06/10 -v3][RFC] tracing: Move raw_init from events to class Steven Rostedt
2010-05-11 3:00 ` [PATCH 07/10 -v3][RFC] tracing: Allow events to share their print functions Steven Rostedt
2010-05-11 3:00 ` [PATCH 08/10 -v3][RFC] tracing: Move print functions into event class Steven Rostedt
2010-05-11 3:00 ` [PATCH 09/10 -v3][RFC] tracing: Remove duplicate id information in event structure Steven Rostedt
2010-05-11 3:00 ` [PATCH 10/10 -v3][RFC] tracing: Combine event filter_active and enable into single flags field Steven Rostedt
2010-05-11 3:30 ` Mathieu Desnoyers [this message]
2010-05-11 13:30 ` Steven Rostedt
2010-05-11 14:05 ` Mathieu Desnoyers
2010-05-11 19:00 ` 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=20100511033026.GA28162@Krystal \
--to=mathieu.desnoyers@efficios.com \
--cc=acme@redhat.com \
--cc=akpm@linux-foundation.org \
--cc=fweisbec@gmail.com \
--cc=hch@lst.de \
--cc=laijs@cn.fujitsu.com \
--cc=linux-kernel@vger.kernel.org \
--cc=lizf@cn.fujitsu.com \
--cc=mhiramat@redhat.com \
--cc=mingo@elte.hu \
--cc=peterz@infradead.org \
--cc=rostedt@goodmis.org \
--cc=tglx@linutronix.de \
/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