[PATCH] tsan: allocate vector clocks using slab allocator

Dmitry Vyukov dvyukov at google.com
Tue Aug 5 11:51:35 PDT 2014


Hi kcc,

Vector clocks is the most actively allocated object in tsan runtime. Current internal allocator is not scalable enough to handle allocation of clocks in scalable way (too small caches). This changes transforms clocks to 2-level array with 512-byte blocks. Since all blocks are of the same size, it's possible to cache them more efficiently in per-thread caches.

http://reviews.llvm.org/D4794

Files:
  lib/sanitizer_common/sanitizer_thread_registry.cc
  lib/sanitizer_common/sanitizer_thread_registry.h
  lib/tsan/rtl/tsan_clock.cc
  lib/tsan/rtl/tsan_clock.h
  lib/tsan/rtl/tsan_flags.cc
  lib/tsan/rtl/tsan_rtl.h
  lib/tsan/rtl/tsan_rtl_mutex.cc
  lib/tsan/rtl/tsan_rtl_thread.cc
  lib/tsan/rtl/tsan_sync.cc
  lib/tsan/rtl/tsan_sync.h
  lib/tsan/tests/unit/tsan_clock_test.cc
  lib/tsan/tests/unit/tsan_sync_test.cc
  test/tsan/thread_detach.c
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D4794.12207.patch
Type: text/x-patch
Size: 30388 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140805/ecf5ba80/attachment.bin>


More information about the llvm-commits mailing list