[PATCH] D102486: Use a non-recursive mutex in GsymCreator.

Simon Giesecke via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat May 15 02:43:14 PDT 2021


simon.giesecke added a comment.

In D102486#2760836 <https://reviews.llvm.org/D102486#2760836>, @clayborg wrote:

> In D102486#2759417 <https://reviews.llvm.org/D102486#2759417>, @simon.giesecke wrote:
>
>> GSYM conversion still spends a significant time for locking in `GsymCreator::insertString` even with only 8 threads, so lock contention seems to be generally an issue here. I was wondering if we could avoid locking the mutex here, but using thread-local tables until finalisation does not seem to be feasible since any thread might insert the same string IIUC and we want to have unique IDs at this point. A lock-free map might be an alternative here, though?
>
> I am open to ideas to speed things up, but many things rely on strings being correctly uniqued: strings for function names and inlined function names, files in the file tables (which consist of two string: directory + basename).

Sure, that's a property that must be maintained.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D102486



More information about the llvm-commits mailing list