[llvm] [LLVM][DWARF] Create thread safe context for DWP DWARFContext (PR #68262)

David Blaikie via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 9 13:05:04 PDT 2023


dwblaikie wrote:

> > > Not sure I follow - wouldn't it be suitable for a ThreadUnsafeDWARFContext to create a ThreadUnsafeDWARFContext for the DWP? And only a ThreadSafeDWARFContext would create a ThreadSafeDWARFContext for the DWP?
> > 
> > 
> > No one is creating a thread safe context right now except llvm-gsymutil. So we could enable thread safe everywhere, but people seemed to think there would be some performance hit if that was done.
> 
> If this issue here was we had a thread safe DWARContext for the main DWARF, and this wasn't being correctly propagated into the .dwp DWARFContext, then this should be fixed by detecting the thread safe setting from the DWARContext and using that setting for any child DWARFContext (.dwp and any .dwo files that are not in a .dwp file) objects.

But this code change is being made in the `ThreadUnsafeDWARFContextState` - the thread unsafe class is making a thread safe DWP context. That doesn't seem right? Shouldn't only a ThreadSafeDWARFContextState create a thread safe context for the DWP?

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


More information about the llvm-commits mailing list