lkml.org 
[lkml]   [2012]   [Aug]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    SubjectRe: [RFC][PATCH 4/4] perf/events: Use helper functions in event assignment to shrink macro size
    From
    Date
    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)
    > > > +{
    > > > + 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.
    >
    > You mean just have perf_trace_event_submit() call perf_tp_event()
    > directly?
    >
    > I have no problem with that. Although I may make that into a separate
    > patch to keep this patch as a 'move' and the other patch as the change.
    >
    > 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.

    > I'm assuming that we want to convert all calls to
    > perf_trace_buf_submit()s into perf_tp_event()?

    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?


    \
     
     \ /
      Last update: 2012-08-13 16:42    [W:0.039 / U:30.260 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site