This is the mail archive of the elfutils-devel@sourceware.org mailing list for the elfutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] libdw: add thread-safety to dwarf_getabbrev()


Hi,

On Sat, 2019-10-26 at 18:50 +0200, Florian Weimer wrote:
> * Jonathon Anderson:
> 
> > > This assumes that memory allocation
> > > is actually a performance problem, otherwise you could let malloc
> > > handle the details.
> > 
> > In our (Dyninst + HPCToolkit) work, we have found that malloc tends to 
> > be slow in the multithreaded case, in particular with many small 
> > allocations. The glibc implementation (which most of our clients use) 
> > uses a full mutex to provide thread-safety. While we could do a lot 
> > better in our own projects with regards to memory management, the fact 
> > remains that malloc alone is a notable facet to the performance of 
> > libdw.
> 
> Current glibc versions have a thread-local fast path, which should
> address some of these concerns.  It's still not a bump-pointer
> allocator, but at least there are no atomics on that path.

Since which version of glibc is there a thread-local fast path?

We don't need a bump-pointer allocator, but we do need something to
store lots of small object allocated over time together, so we can
easily dispose of them when done. The storage size only has to grow.

Thanks,

Mark


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]