[PATCH] D100348: [hwasan] Fix lock contention on thread creation.

Vitaly Buka via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 14 12:37:22 PDT 2021


vitalybuka accepted this revision.
vitalybuka added inline comments.
This revision is now accepted and ready to land.


================
Comment at: compiler-rt/lib/hwasan/hwasan_thread_list.h:92
       SpinMutexLock l(&list_mutex_);
       if (!free_list_.empty()) {
         t = free_list_.back();
----------------
unrelated to the patch but maybe free_list_ and live_list_ could have each own mutex


================
Comment at: compiler-rt/lib/hwasan/hwasan_thread_list.h:133
     DontNeedThread(t);
+    {
+      SpinMutexLock l(&list_mutex_);
----------------
{} redundant in this case


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D100348



More information about the llvm-commits mailing list