Re: [PATCH 01/10] perf, trace: Remove IRQ-disable from perf/tracepoint interaction

Steven Rostedt
2010-05-21T17:53:06Z

On Fri, 2010-05-21 at 13:43 -0400, Frank Ch. Eigler wrote:
> Peter Zijlstra <a.p.zijlstra@chello.nl> writes:
>
> > [...]
> > @@ -799,13 +799,10 @@ perf_trace_templ_##call(struct ftrace_ev
> > static notrace void perf_trace_##call(proto) \
> > { \
> > struct ftrace_event_call *event_call = &event_##call; \
> > - struct pt_regs *__regs = &get_cpu_var(perf_trace_regs); \
> > - \
> > - perf_fetch_caller_regs(__regs, 1); \
> > - \
> > - perf_trace_templ_##template(event_call, __regs, args); \
> > + struct pt_regs __regs; \
> > \
> > - put_cpu_var(perf_trace_regs); \
> > + perf_fetch_caller_regs(&__regs, 1); \
> > + perf_trace_templ_##template(event_call, &__regs, args); \
> > }
> > [...]
>
> To what extent are you worried about something the size of struct
> pt_regs being auto/stack allocated?

Isn't pt_regs already allocated on the stack when interrupted?

-- Steve