public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [RFC][PATCH 0/4] tracing/perf: Use helper functions to help shrink kernel size
@ 2014-02-06 17:39 Steven Rostedt
  2014-02-06 17:39 ` [RFC][PATCH 1/4] tracing: Move raw output code from macro to standalone function Steven Rostedt
                   ` (3 more replies)
  0 siblings, 4 replies; 9+ messages in thread
From: Steven Rostedt @ 2014-02-06 17:39 UTC (permalink / raw)
  To: linux-kernel
  Cc: Ingo Molnar, Andrew Morton, Thomas Gleixner, Peter Zijlstra,
	Frederic Weisbecker, Namhyung Kim, Oleg Nesterov, Li Zefan


I posted this a while ago (August 2012), and it seemed to have positive
feedback. But I forgot about it and it never went any further.

http://lkml.kernel.org/r/20120810034302.758092203@goodmis.org

It works to move the tracepoint code out of the macros and into reusable
functions that can save a whopping 73K from the kernel memory (with just the
modules I used compiled in).

There was some changes in mainline since I last posted this that helped
lower the tracepoint footprint, and that makes the first patch not as much
of an approvement that it was in the past.

Anyway, hopefully this can get into 3.15.

-- Steve


Steven Rostedt (4):
      tracing: Move raw output code from macro to standalone function
      tracing: Move event storage for array from macro to standalone function
      tracing: Use helper functions in event assignment to shrink macro size
      perf/events: Use helper functions in event assignment to shrink macro size

----
 include/linux/ftrace_event.h    | 46 +++++++++++++++++++++--
 include/trace/ftrace.h          | 75 ++++++++++++-------------------------
 kernel/trace/trace_event_perf.c | 51 +++++++++++++++++++++++++
 kernel/trace/trace_events.c     |  6 ---
 kernel/trace/trace_export.c     | 12 ++----
 kernel/trace/trace_output.c     | 83 +++++++++++++++++++++++++++++++++++++++++
 6 files changed, 203 insertions(+), 70 deletions(-)

^ permalink raw reply	[flat|nested] 9+ messages in thread
* [RFC][PATCH 0/4] tracing/perf: Use helper functions to help shrink kernel size
@ 2012-08-10  3:43 Steven Rostedt
  2012-08-10  3:43 ` [RFC][PATCH 3/4] tracing: Use helper functions in event assignment to shrink macro size Steven Rostedt
  0 siblings, 1 reply; 9+ messages in thread
From: Steven Rostedt @ 2012-08-10  3:43 UTC (permalink / raw)
  To: linux-kernel; +Cc: Ingo Molnar, Andrew Morton, Frederic Weisbecker

This patch set is another effort to bring down the size of trace events.

Helper functions are used to remove duplicate code that is created
for each event by the TRACE_EVENT() macros. With a config that enables
707 events in the core kernel, the size is brought down 91,774 bytes!


Steven Rostedt (4):
      tracing: Move print code from macro to standalone function
      tracing: Move event storage for array from macro to standalone function
      tracing: Use helper functions in event assignment to shrink macro size
      perf/events: Use helper functions in event assignment to shrink macro size

----
 include/linux/ftrace_event.h    |   40 +++++++++++++++--
 include/trace/ftrace.h          |   85 +++++++++---------------------------
 kernel/trace/trace_event_perf.c |   26 +++++++++++
 kernel/trace/trace_events.c     |    6 ---
 kernel/trace/trace_export.c     |   12 ++----
 kernel/trace/trace_output.c     |   90 +++++++++++++++++++++++++++++++++++++++
 6 files changed, 176 insertions(+), 83 deletions(-)

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

end of thread, other threads:[~2014-02-21 18:54 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-02-06 17:39 [RFC][PATCH 0/4] tracing/perf: Use helper functions to help shrink kernel size Steven Rostedt
2014-02-06 17:39 ` [RFC][PATCH 1/4] tracing: Move raw output code from macro to standalone function Steven Rostedt
2014-02-06 17:39 ` [RFC][PATCH 2/4] tracing: Move event storage for array " Steven Rostedt
2014-02-06 17:39 ` [RFC][PATCH 3/4] tracing: Use helper functions in event assignment to shrink macro size Steven Rostedt
2014-02-06 17:39 ` [RFC][PATCH 4/4] perf/events: " Steven Rostedt
2014-02-06 18:47   ` Steven Rostedt
2014-02-12 19:58   ` Peter Zijlstra
2014-02-21 18:53     ` Steven Rostedt
  -- strict thread matches above, loose matches on Subject: below --
2012-08-10  3:43 [RFC][PATCH 0/4] tracing/perf: Use helper functions to help shrink kernel size Steven Rostedt
2012-08-10  3:43 ` [RFC][PATCH 3/4] tracing: Use helper functions in event assignment to shrink macro size Steven Rostedt

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