Re: [PATCH v3 4/8] Lock the demangled hash table

Tom Tromey
2019-05-30T21:58:16Z

>> This introduces a lock that is used when modifying the demangled hash
>> table.

Pedro> There's only a single mutex, and the comment says _THE_ demangled
Pedro> hash table, but AFAICS, each per_bfd has its own table, right?

Yes, that's correct. I'll fix the comment.

Pedro> A single lock for every table compared to a lock per table might be
Pedro> a good approach, but I'd welcome extended comments to explain
Pedro> that design choice.

I didn't want to put a mutex into the per-bfd object, mostly because it
uses space for the entire lifetime of that, while the mutex is only used
while demangling minsym names; and that can (currently) only be done for
one objfile at a time.

Tom