[PATCH] D140841: [DWARFLinkerNext] Add StringPool class.

Alexey Lapshin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 25 07:19:40 PST 2023


avl added a comment.

In D140841#4061767 <https://reviews.llvm.org/D140841#4061767>, @avl wrote:

> In D140841#4059769 <https://reviews.llvm.org/D140841#4059769>, @JDevlieghere wrote:
>
>> LGTM for the DwarfLinker.
>>
>> Alexey, how hard would it be to port over the ConstString implementation to use the ConcurrentHashTable?
>
> I think it should not be hard. Thing which I am not sure at the moment is - would it be OK to have thread local allocators for lldb. Anyway, I will prepare a patch and let`s see.

So far, the answer is that port over the ConstString implementation to use the ConcurrentHashTable requires some work. The main thing is that ConcurrentHashTable assumes that it uses thread safe memory pool. For the use case from D96035 <https://reviews.llvm.org/D96035> there may be used thread local BumpPtrAllocator or allocator from D142318 <https://reviews.llvm.org/D142318>(as it uses Thread Pools to create threads). These solutions could not be used for lldb, as it creates threads not only using ThreadPools. So to port  over the ConstString implementation to use the ConcurrentHashTable  it is necessary to implement thread safe BumpPtrAllocator not relying on ThreadPools.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D140841/new/

https://reviews.llvm.org/D140841



More information about the llvm-commits mailing list