lkml.org 
[lkml]   [2009]   [Nov]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH 1/4] tracing: Use the perf recursion protection from trace event
From
Date
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.



\
 
 \ /
  Last update: 2009-11-22 12:27    [W:0.065 / U:1.412 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site