Re: [PATCH/RFC 12/16] perf tools: Reduce lock contention when processing events

2015-12-14 Thread Namhyung Kim
Hi Jiri, On Mon, Dec 14, 2015 at 09:43:04AM +0100, Jiri Olsa wrote: > On Thu, Dec 10, 2015 at 04:53:31PM +0900, Namhyung Kim wrote: > > When multi-thread is enabled, the machine->threads_lock is contented > > as all worker threads try to grab the writer lock using the > >

Re: [PATCH/RFC 12/16] perf tools: Reduce lock contention when processing events

2015-12-14 Thread Jiri Olsa
On Thu, Dec 10, 2015 at 04:53:31PM +0900, Namhyung Kim wrote: > When multi-thread is enabled, the machine->threads_lock is contented > as all worker threads try to grab the writer lock using the > machine__findnew_thread(). Usually, the thread they're looking for is > in the tree so they only

Re: [PATCH/RFC 12/16] perf tools: Reduce lock contention when processing events

2015-12-14 Thread Namhyung Kim
Hi Jiri, On Mon, Dec 14, 2015 at 09:43:04AM +0100, Jiri Olsa wrote: > On Thu, Dec 10, 2015 at 04:53:31PM +0900, Namhyung Kim wrote: > > When multi-thread is enabled, the machine->threads_lock is contented > > as all worker threads try to grab the writer lock using the > >

Re: [PATCH/RFC 12/16] perf tools: Reduce lock contention when processing events

2015-12-14 Thread Jiri Olsa
On Thu, Dec 10, 2015 at 04:53:31PM +0900, Namhyung Kim wrote: > When multi-thread is enabled, the machine->threads_lock is contented > as all worker threads try to grab the writer lock using the > machine__findnew_thread(). Usually, the thread they're looking for is > in the tree so they only

[PATCH/RFC 12/16] perf tools: Reduce lock contention when processing events

2015-12-09 Thread Namhyung Kim
When multi-thread is enabled, the machine->threads_lock is contented as all worker threads try to grab the writer lock using the machine__findnew_thread(). Usually, the thread they're looking for is in the tree so they only need the reader lock though. Thus try machine__find_thread() first, and

[PATCH/RFC 12/16] perf tools: Reduce lock contention when processing events

2015-12-09 Thread Namhyung Kim
When multi-thread is enabled, the machine->threads_lock is contented as all worker threads try to grab the writer lock using the machine__findnew_thread(). Usually, the thread they're looking for is in the tree so they only need the reader lock though. Thus try machine__find_thread() first, and