[llvm] Reduce llvm-gsymutil memory usage (PR #91023)
Kevin Frei via llvm-commits
llvm-commits at lists.llvm.org
Thu Jun 27 08:51:49 PDT 2024
kevinfrei 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))
> The other option would be 2 - you have one covering the first element of the array, and another covering the rest - I guess then you have problems when reallocating the array, though?
Yup. That's what @ayermolo [caught as well](https://github.com/llvm/llvm-project/pull/91023#issuecomment-2118147102). You need *3* locks. No amount of wishful thinking is gonna change that (I tried. Many different ways. Several times. 🫤)
https://github.com/llvm/llvm-project/pull/91023
More information about the llvm-commits
mailing list