public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 00/10][RFC] tracing: Lowering the footprint of TRACE_EVENTs
@ 2010-04-26 19:50 Steven Rostedt
  2010-04-26 19:50 ` [PATCH 01/10][RFC] tracing: Create class struct for events Steven Rostedt
                   ` (11 more replies)
  0 siblings, 12 replies; 45+ messages in thread
From: Steven Rostedt @ 2010-04-26 19:50 UTC (permalink / raw)
  To: linux-kernel
  Cc: Ingo Molnar, Andrew Morton, Thomas Gleixner, Peter Zijlstra,
	Frederic Weisbecker, Arnaldo Carvalho de Melo, Mathieu Desnoyers,
	Lai Jiangshan, Li Zefan, Masami Hiramatsu, Christoph Hellwig

This is an RFC patch set that also affects kprobes and perf.

At the Linux Collaboration Summit, I talked with Mathieu and others about
lowering the footprint of trace events. I spent all of last week
trying to get the size as small as I could.

Currently, each TRACE_EVENT() macro adds 1 - 5K per tracepoint. I got various
results by adding a TRACE_EVENT() with the compiler, depending on
config options that did not seem related. The new tracepoint I added
would add between 1 and 5K, but I did not investigate enough to
see what the true size was.

What was consistent, was the DEFINE_EVENT(). Currently, it adds
a little over 700 bytes per DEFINE_EVENT().

This patch series does not seem to affect TRACE_EVENT() much (had
the same various sizes), but consistently brings DEFINE_EVENT()s
down from 700 bytes to 250 bytes per DEFINE_EVENT(). Since syscalls
use one "class" and are equivalent to DEFINE_EVENT() this can
be a significant savings.

With events and syscalls (82 events and 616 syscalls), before this
patch series, the size of vmlinux was: 16161794, and afterward: 16058182.

That is 103,612 bytes in savings! (over 100K)


Without tracing syscalls (82 events), it brought the size of vmlinux
down from 1591046 to 15999394.

22,071 bytes in savings.

This is just an RFC (for now), to get peoples opinions on the changes.
It does a bit of rewriting of the CPP macros, just to warning you ;-)

-- Steve

The code can be found at:

  git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-2.6-trace.git
tip/tracing/rfc-1


Steven Rostedt (10):
      tracing: Create class struct for events
      tracing: Let tracepoints have data passed to tracepoint callbacks
      tracing: Convert TRACE_EVENT() to use the DECLARE_TRACE_DATA()
      tracing: Remove per event trace registering
      tracing: Move fields from event to class structure
      tracing: Move raw_init from events to class
      tracing: Allow events to share their print functions
      tracing: Move print functions into event class
      tracing: Remove duplicate id information in event structure
      tracing: Combine event filter_active and enable into single flags field

----
 include/linux/ftrace_event.h         |   71 +++++++++---
 include/linux/syscalls.h             |   55 +++-------
 include/linux/tracepoint.h           |  119 ++++++++++++++++---
 include/trace/ftrace.h               |  215 ++++++++++------------------------
 include/trace/syscall.h              |    9 +-
 kernel/trace/blktrace.c              |   13 ++-
 kernel/trace/kmemtrace.c             |   28 +++--
 kernel/trace/trace.c                 |    9 +-
 kernel/trace/trace.h                 |    5 +-
 kernel/trace/trace_event_perf.c      |   17 ++-
 kernel/trace/trace_events.c          |  126 +++++++++++++-------
 kernel/trace/trace_events_filter.c   |   28 +++--
 kernel/trace/trace_export.c          |   16 ++-
 kernel/trace/trace_functions_graph.c |    2 +-
 kernel/trace/trace_kprobe.c          |  104 ++++++++++-------
 kernel/trace/trace_output.c          |  137 +++++++++++++++-------
 kernel/trace/trace_output.h          |    2 +-
 kernel/trace/trace_syscalls.c        |  105 +++++++++++++++--
 kernel/tracepoint.c                  |   91 ++++++++-------
 19 files changed, 700 insertions(+), 452 deletions(-)

^ permalink raw reply	[flat|nested] 45+ messages in thread

end of thread, other threads:[~2010-04-30 21:02 UTC | newest]

Thread overview: 45+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-04-26 19:50 [PATCH 00/10][RFC] tracing: Lowering the footprint of TRACE_EVENTs Steven Rostedt
2010-04-26 19:50 ` [PATCH 01/10][RFC] tracing: Create class struct for events Steven Rostedt
2010-04-28 20:22   ` Mathieu Desnoyers
2010-04-28 20:38     ` Steven Rostedt
2010-04-26 19:50 ` [PATCH 02/10][RFC] tracing: Let tracepoints have data passed to tracepoint callbacks Steven Rostedt
2010-04-27  9:08   ` Li Zefan
2010-04-27 15:28     ` Steven Rostedt
2010-04-28 20:37   ` Mathieu Desnoyers
2010-04-28 23:56     ` Steven Rostedt
2010-04-26 19:50 ` [PATCH 03/10][RFC] tracing: Convert TRACE_EVENT() to use the DECLARE_TRACE_DATA() Steven Rostedt
2010-04-28 20:39   ` Mathieu Desnoyers
2010-04-28 23:57     ` Steven Rostedt
2010-04-29  0:03       ` Mathieu Desnoyers
2010-04-26 19:50 ` [PATCH 04/10][RFC] tracing: Remove per event trace registering Steven Rostedt
2010-04-28 20:44   ` Mathieu Desnoyers
2010-04-29  0:00     ` Steven Rostedt
2010-04-29  0:05       ` Mathieu Desnoyers
2010-04-29  0:20         ` Steven Rostedt
     [not found]           ` <20100429133649.GC14617@Krystal>
2010-04-29 14:06             ` Steven Rostedt
2010-04-29 14:55               ` Mathieu Desnoyers
2010-04-29 16:06                 ` Steven Rostedt
2010-04-30 17:09                   ` Mathieu Desnoyers
2010-04-30 18:16                     ` Steven Rostedt
2010-04-30 19:06                       ` Mathieu Desnoyers
2010-04-30 19:48                         ` Steven Rostedt
2010-04-30 20:07                           ` Mathieu Desnoyers
2010-04-30 20:14                             ` Steven Rostedt
2010-04-30 21:02                               ` Mathieu Desnoyers
2010-04-26 19:50 ` [PATCH 05/10][RFC] tracing: Move fields from event to class structure Steven Rostedt
2010-04-28 20:58   ` Mathieu Desnoyers
2010-04-29  0:02     ` Steven Rostedt
     [not found]       ` <20100429133213.GA14617@Krystal>
2010-04-29 13:50         ` Steven Rostedt
2010-04-26 19:50 ` [PATCH 06/10][RFC] tracing: Move raw_init from events to class Steven Rostedt
2010-04-28 21:00   ` Mathieu Desnoyers
2010-04-26 19:50 ` [PATCH 07/10][RFC] tracing: Allow events to share their print functions Steven Rostedt
2010-04-28 21:03   ` Mathieu Desnoyers
2010-04-26 19:50 ` [PATCH 08/10][RFC] tracing: Move print functions into event class Steven Rostedt
2010-04-28 21:03   ` Mathieu Desnoyers
2010-04-26 19:50 ` [PATCH 09/10][RFC] tracing: Remove duplicate id information in event structure Steven Rostedt
2010-04-28 21:06   ` Mathieu Desnoyers
2010-04-29  0:04     ` Steven Rostedt
2010-04-26 19:50 ` [PATCH 10/10][RFC] tracing: Combine event filter_active and enable into single flags field Steven Rostedt
2010-04-28 21:13   ` Mathieu Desnoyers
2010-04-28 14:45 ` [PATCH 00/10][RFC] tracing: Lowering the footprint of TRACE_EVENTs Masami Hiramatsu
2010-04-28 20:18 ` Mathieu Desnoyers

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox