[all-commits] [llvm/llvm-project] cde307: [scudo] Fine tune busy-waiting in HybridMutex

ChiaHungDuan via All-commits all-commits at lists.llvm.org
Thu Sep 21 14:03:51 PDT 2023

  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: cde307e4657738f1ef5f2eceaa7f896358acb3d6
  Author: Chia-hung Duan <chiahungduan at google.com>
  Date:   2023-09-21 (Thu, 21 Sep 2023)

  Changed paths:
    M compiler-rt/lib/scudo/standalone/common.h
    M compiler-rt/lib/scudo/standalone/mutex.h

  Log Message:
  [scudo] Fine tune busy-waiting in HybridMutex

Instead of using hardware specific instruction, using simple loop over
volatile variable gives similar and more predicatable waiting time. Also
fine tune the waiting time to fit with the average time in malloc/free

Reviewed By: cferris

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

More information about the All-commits mailing list