lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Mon, 13 Aug 2012 10:03:44 +0200
From:	Peter Zijlstra <a.p.zijlstra@...llo.nl>
To:	Steven Rostedt <rostedt@...dmis.org>
Cc:	linux-kernel@...r.kernel.org, Ingo Molnar <mingo@...nel.org>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Frederic Weisbecker <fweisbec@...il.com>
Subject: Re: [RFC][PATCH 4/4] perf/events: Use helper functions in event
 assignment to shrink macro size

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@...hat.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.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ