[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1258889093.28730.380.camel@laptop>
Date: Sun, 22 Nov 2009 12:24:53 +0100
From: Peter Zijlstra <peterz@...radead.org>
To: Ingo Molnar <mingo@...e.hu>
Cc: Frederic Weisbecker <fweisbec@...il.com>,
LKML <linux-kernel@...r.kernel.org>,
Arnaldo Carvalho de Melo <acme@...hat.com>,
Paul Mackerras <paulus@...ba.org>,
Steven Rostedt <rostedt@...dmis.org>,
Masami Hiramatsu <mhiramat@...hat.com>,
Jason Baron <jbaron@...hat.com>
Subject: Re: [PATCH 1/4] tracing: Use the perf recursion protection from
trace event
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.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists