public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Peter Zijlstra <a.p.zijlstra@chello.nl>
To: Steven Rostedt <rostedt@goodmis.org>
Cc: linux-kernel@vger.kernel.org, Ingo Molnar <mingo@kernel.org>,
	Andrew Morton <akpm@linux-foundation.org>,
	Frederic Weisbecker <fweisbec@gmail.com>
Subject: Re: [RFC][PATCH 4/4] perf/events: Use helper functions in event assignment to shrink macro size
Date: Mon, 13 Aug 2012 10:03:44 +0200	[thread overview]
Message-ID: <1344845024.31459.9.camel@twins> (raw)
In-Reply-To: <20120810034708.589220175@goodmis.org>

On Thu, 2012-08-09 at 23:43 -0400, Steven Rostedt wrote:
> plain text document attachment
> (0004-perf-events-Use-helper-functions-in-event-assignment.patch)
> From: Steven Rostedt <srostedt@redhat.com>
> 
> The functions that assign the contents for the perf software events are
> defined by the TRACE_EVENT() macros. Each event has its own unique
> way to assign data to its buffer. When you have over 700 events,
> that means there's 700 functions assigning data uniquely for each
> event.
> 
> By making helper functions in the core kernel to do the work
> instead, we can shrink the size of the kernel down a bit.
> 
> With a kernel configured with 707 events, the change in size was:
> 
>    text    data     bss     dec     hex filename
> 19966937        2594648 1945600 24507185        175f331 vmlinux-before
> 19924761        2594584 1945600 24464945        1754e31 vmlinux-after
> 
> That's a total of 42240 bytes, which comes down to 59 bytes per event.

Seems like good stuff.. one nit..


> +void perf_trace_event_submit(void *raw_data, struct ftrace_event_call *event_call,
> +                            struct perf_trace_event *pe)
> +{
> +       struct hlist_head *head;
> +
> +       head = this_cpu_ptr(event_call->perf_events);
> +       perf_trace_buf_submit(raw_data, pe->entry_size, pe->rctx, pe->addr,
> +                             pe->count, &pe->regs, head);
> +}

Can you make perf_trace_buf_submit() go away? Its reduced to a simple
fwd function and layering another wrapper on top seems like pushing it.

  reply	other threads:[~2012-08-13  8:03 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 1/4] tracing: Move print code from macro to standalone function Steven Rostedt
2012-08-10  3:43 ` [RFC][PATCH 2/4] tracing: Move event storage for array " Steven Rostedt
2012-08-10  3:43 ` [RFC][PATCH 3/4] tracing: Use helper functions in event assignment to shrink macro size Steven Rostedt
2012-08-10  3:43 ` [RFC][PATCH 4/4] perf/events: " Steven Rostedt
2012-08-13  8:03   ` Peter Zijlstra [this message]
2012-08-13 13:03     ` Steven Rostedt
2012-08-13 13:52       ` Peter Zijlstra
2012-08-13 14:40         ` Steven Rostedt
2012-08-13 14:47           ` Peter Zijlstra
  -- strict thread matches above, loose matches on Subject: below --
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 4/4] perf/events: Use helper functions in event assignment to shrink macro size Steven Rostedt
2014-02-06 18:47   ` Steven Rostedt
2014-02-12 19:58   ` Peter Zijlstra
2014-02-21 18:53     ` 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=1344845024.31459.9.camel@twins \
    --to=a.p.zijlstra@chello.nl \
    --cc=akpm@linux-foundation.org \
    --cc=fweisbec@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=rostedt@goodmis.org \
    /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