[llvm] Reduce llvm-gsymutil memory usage (PR #91023)

David Blaikie via llvm-commits llvm-commits at lists.llvm.org
Fri Jun 28 08:57:42 PDT 2024


dwblaikie wrote:

> > Is it worth having 3 separate mutexes? One answer would be to go fully coarse grained - just have 1 that covers the whole array. Does that have noticably worse performance for your use case?
> 
> I started with what you're describing, and it deadlocks, as there's a path from the non-CU DIE creation that eventually recurses into the function (which I called out in the [review above](https://github.com/llvm/llvm-project/pull/91023#issuecomment-2116631029))

Thanks, sorry I'm rehashing things. A recursive mutex would apply here, then? (& we even have this thing: https://llvm.org/doxygen/Mutex_8h_source.html - which would reduce the overhead (presumably?) to the non-multithreaded users (well, I guess only to users building all of LLVM without multithreading, not users building with multithreading enabled and just not using multiple threads to interact with libDebugInfoDWARF)?)

Does a single recursive mutex substantially affect the performance of the situations you're interested in?

https://github.com/llvm/llvm-project/pull/91023


More information about the llvm-commits mailing list