[PATCH] D157459: Make DWARFContext more thread safe.

Adrian Prantl via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 14 10:09:38 PDT 2023


aprantl added a comment.

This patch is protecting access to the fields of DWARFContext. For all the methods returning section pointers, such as `const DWARFDebugLoc *DWARFContext::getDebugLoc()` what are concurrency requirements/guarantees? Do these objects all carry their own mutexes?



================
Comment at: llvm/include/llvm/DebugInfo/DWARF/DWARFContext.h:50
   DWARFUnitVector NormalUnits;
+  // Mutex protecting multi-threaded access to the DWARFContext.
+  std::recursive_mutex Mutex;
----------------
Nit: `///`


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D157459



More information about the llvm-commits mailing list