Re: [PATCH] perf top: Fix a race in callchain handling

From: Arnaldo Carvalho de Melo
Date: Fri May 11 2012 - 11:01:13 EST

Em Fri, May 11, 2012 at 11:10:59AM +0900, Namhyung Kim escreveu:
> On Mon, 07 May 2012 10:32:22 +0900, Namhyung Kim wrote:
> > I thought about it before, but it still cannot protect it from accessing
> > a hists by multiple concurrent threads. IOW if two threads call the
> > function to a same hists at the same time, ->callchain_collapse_cursor
> > would still get the race problem - so crashed.
> >
> > I guess callchain_cursor should be thread-local, eventually. No need to
> > make it hist-local IMHO.
> So, any thoughts?

Can you try writing a patch using TLS?

- Arnaldo
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at
Please read the FAQ at