[all-commits] [llvm/llvm-project] e3f4c6: tsan: don't use spinning in __cxa_guard_acquire/pt...

Dmitry Vyukov via All-commits all-commits at lists.llvm.org
Wed Aug 4 04:56:44 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: e3f4c63e78b1ed54f0a35aeb30730e5c74bcfeed
      https://github.com/llvm/llvm-project/commit/e3f4c63e78b1ed54f0a35aeb30730e5c74bcfeed
  Author: Dmitry Vyukov <dvyukov at google.com>
  Date:   2021-08-04 (Wed, 04 Aug 2021)

  Changed paths:
    M compiler-rt/lib/tsan/rtl/tsan_interceptors_posix.cpp

  Log Message:
  -----------
  tsan: don't use spinning in __cxa_guard_acquire/pthread_once

Currently we use passive spinning with internal_sched_yield to wait
in __cxa_guard_acquire/pthread_once. Passive spinning tends to degrade
ungracefully under high load. Use FutexWait/Wake instead.

Depends on D107359.

Reviewed By: vitalybuka, melver

Differential Revision: https://reviews.llvm.org/D107360




More information about the All-commits mailing list