Re: [RFC][PATCH 4/4] perf/events: Use helper functions in event assignment to shrink macro size

2014-02-21 Thread Steven Rostedt
On Wed, 12 Feb 2014 20:58:27 +0100 Peter Zijlstra wrote: > > +void *perf_trace_event_setup(struct ftrace_event_call *event_call, > > +struct perf_trace_event *pe) > > +{ > > + pe->head = this_cpu_ptr(event_call->perf_events); > > + if (pe->constant && hlist_empty(pe->

Re: [RFC][PATCH 4/4] perf/events: Use helper functions in event assignment to shrink macro size

2014-02-12 Thread Peter Zijlstra
> +void *perf_trace_event_setup(struct ftrace_event_call *event_call, > + struct perf_trace_event *pe) > +{ > + pe->head = this_cpu_ptr(event_call->perf_events); > + if (pe->constant && hlist_empty(pe->head)) > + return NULL; > + > + pe->entry_size

Re: [RFC][PATCH 4/4] perf/events: Use helper functions in event assignment to shrink macro size

2014-02-06 Thread Steven Rostedt
On Thu, 06 Feb 2014 12:39:14 -0500 Steven Rostedt wrote: > From: Steven Rostedt > > 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 500 events, > t

[RFC][PATCH 4/4] perf/events: Use helper functions in event assignment to shrink macro size

2014-02-06 Thread Steven Rostedt
From: Steven Rostedt 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 500 events, that means there's 500 functions assigning data uniquely for each event.

Re: [RFC][PATCH 4/4] perf/events: Use helper functions in event assignment to shrink macro size

2012-08-13 Thread Peter Zijlstra
On Mon, 2012-08-13 at 10:40 -0400, Steven Rostedt wrote: > > Yeah.. I think you're referring to the {u,k}probes open-coded nonsense? > > Should we make those use these new helpers you created as well? > > They may not need it. The helpers I created were for the macros that are > created by all TRA

Re: [RFC][PATCH 4/4] perf/events: Use helper functions in event assignment to shrink macro size

2012-08-13 Thread Steven Rostedt
On Mon, 2012-08-13 at 15:52 +0200, Peter Zijlstra wrote: > > Looking at the history of perf_trace_buf_submit(), it use to be more > > than one function call. But when you inlined > > perf_swevent_put_recursion_context(), it became just a one2one mapping. > > Right. OK, this should go as a separa

Re: [RFC][PATCH 4/4] perf/events: Use helper functions in event assignment to shrink macro size

2012-08-13 Thread Peter Zijlstra
On Mon, 2012-08-13 at 09:03 -0400, Steven Rostedt wrote: > On Mon, 2012-08-13 at 10:03 +0200, Peter Zijlstra wrote: > > > > +void perf_trace_event_submit(void *raw_data, struct ftrace_event_call > > > *event_call, > > > +struct perf_trace_event *pe) > > > +{ > > > +

Re: [RFC][PATCH 4/4] perf/events: Use helper functions in event assignment to shrink macro size

2012-08-13 Thread Steven Rostedt
On Mon, 2012-08-13 at 10:03 +0200, Peter Zijlstra wrote: > > +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(even

Re: [RFC][PATCH 4/4] perf/events: Use helper functions in event assignment to shrink macro size

2012-08-13 Thread Peter Zijlstra
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 > > The functions that assign the contents for the perf software events are > defined by the TRACE_EVENT() macros. E

[RFC][PATCH 4/4] perf/events: Use helper functions in event assignment to shrink macro size

2012-08-09 Thread Steven Rostedt
From: Steven Rostedt 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.