Messages in this thread | | | Subject | Re: [PATCH 1/4] tracing: Use the perf recursion protection from trace event | From | Peter Zijlstra <> | Date | Sun, 22 Nov 2009 12:24:53 +0100 |
| |
On Sun, 2009-11-22 at 12:22 +0100, Ingo Molnar wrote:
> > > +void perf_swevent_put_recursion_context(int *recursion) > > > { > > > - struct perf_cpu_context *cpuctx = &get_cpu_var(perf_cpu_context); > > > - int *recursion = perf_swevent_recursion_context(cpuctx); > > > - struct perf_event_context *ctx; > > > - > > > - if (*recursion) > > > - goto out; > > > + (*recursion)--; > > > +} > > > > And here as well. > > Global functions are in essence a barrier() to GCC but yeah.
Can't rely on that, because if the thing decides to inline this function it looses that barrier semantic.
And it being such a small function with a few callsites in the same translation unit, there's a fair chance it will actually inline.
| |