Messages in this thread | | | Date | Tue, 9 Jun 2015 11:25:15 -0300 | From | Arnaldo Carvalho de Melo <> | Subject | Re: [tip:perf/core] perf tools: Protect accesses the dso rbtrees/ lists with a rw lock |
| |
Em Tue, Jun 09, 2015 at 11:56:10AM +0200, Ingo Molnar escreveu: > * tip-bot for Arnaldo Carvalho de Melo <tipbot@zytor.com> wrote:
> > +void dsos__add(struct dsos *dsos, struct dso *dso) > > +{ > > + pthread_rwlock_wrlock(&dsos->lock); > > + __dsos__add(dsos, dso); > > + pthread_rwlock_unlock(&dsos->lock); > > } > > Please introduce wrappers and use the kernel API names: > read_lock()/read_unlock()/etc. (and name the mutex primitives > mutex_lock()/unlock()) > > That way kernel developers will find their way around the perf locking details > easily, and we can also use liblockdep to check locking correctness.
Yeah, we discussed about that, will do it eventually, you said this was already present in some tools/ code, but I couldn't find it:
[acme@zoo linux]$ find tools/ -type f | xargs grep '\<mutex_unlock' [acme@zoo linux]$
Anyway, worthy goal, will do.
- Arnaldo
| |