Skip to content

RFC tracing/perf: Use helper functions to help shrink kernel size

Steven Rostedt lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest4 patches 3 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4tracing: Move raw output code from macro to standalone functioninclude/linux/ftrace_event.h include/trace/ftrace.h kernel/trace/trace_output.c+37 -90 replies
2/4tracing: Move event storage for array from macro to standalone functioninclude/linux/ftrace_event.h include/trace/ftrace.h kernel/trace/trace_events.c +2 more+33 -260 replies
3/4tracing: Use helper functions in event assignment to shrink macro sizeinclude/linux/ftrace_event.h include/trace/ftrace.h kernel/trace/trace_output.c+53 -140 replies
4/4perf/events: Use helper functions in event assignment to shrink macro sizeinclude/linux/ftrace_event.h include/trace/ftrace.h kernel/trace/trace_event_perf.c+80 -213 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [RFC][PATCH 0/4] tracing/perf: Use helper functions to help shrink kernel size

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/[email protected]

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(-)