RE: [PATCH RFC V2 05/10] perf tools: lock to protect thread list

2017-09-18 Thread Liang, Kan
> > SNIP > > > + pthread_mutex_unlock(&thread->namespaces_lock); > > + > > return 0; > > } > > > > -void thread__namespaces_id(const struct thread *thread, > > +void thread__namespaces_id(struct thread *thread, > >u64 *dev, u64 *ino) > > { > > struct namespaces

Re: [PATCH RFC V2 05/10] perf tools: lock to protect thread list

2017-09-18 Thread Jiri Olsa
On Sun, Sep 10, 2017 at 07:23:18PM -0700, kan.li...@intel.com wrote: SNIP > + pthread_mutex_unlock(&thread->namespaces_lock); > + > return 0; > } > > -void thread__namespaces_id(const struct thread *thread, > +void thread__namespaces_id(struct thread *thread, >

[PATCH RFC V2 05/10] perf tools: lock to protect thread list

2017-09-10 Thread kan . liang
From: Kan Liang Add two locks to protect namespaces_list and comm_list. The comm which is used in db-export are not protected. Because the multithread code will not touch it. It can be added later if required. Signed-off-by: Kan Liang --- tools/perf/ui/browsers/hists.c | 2 +- tools/perf/uti