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

Tom Tromey tom@tromey.com
Thu May 30 21:58:00 GMT 2019


>> 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



More information about the Gdb-patches mailing list