[all-commits] [llvm/llvm-project] 37a5a3: [MemProf] Avoid global lock when updating MIB cache

Teresa Johnson via All-commits all-commits at lists.llvm.org
Wed Sep 15 16:06:36 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 37a5a3ae5508a120a6eba113dbd0b23ab27d650e
      https://github.com/llvm/llvm-project/commit/37a5a3ae5508a120a6eba113dbd0b23ab27d650e
  Author: Teresa Johnson <tejohnson at google.com>
  Date:   2021-09-15 (Wed, 15 Sep 2021)

  Changed paths:
    M compiler-rt/lib/memprof/memprof_allocator.cpp

  Log Message:
  -----------
  [MemProf] Avoid global lock when updating MIB cache

Previously we used a global Allocator-scope mutex to lock when adding a
deallocation to the MIB cache. This resulted in a lot of contention.
Instead add and use per-set mutexes.

Along with this, we now need to remove the global miss and access count
variables and instead utilize the per-set statistics to report the
overall miss rate.

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




More information about the All-commits mailing list