This is an archive of the discontinued LLVM Phabricator instance.

tsan: allocate vector clocks using slab allocator
AbandonedPublic

Authored by dvyukov on Aug 5 2014, 11:51 AM.

Details

Reviewers
kcc
Summary

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.

Diff Detail

Event Timeline

dvyukov updated this revision to Diff 12207.Aug 5 2014, 11:51 AM
dvyukov retitled this revision from to tsan: allocate vector clocks using slab allocator.
dvyukov updated this object.
dvyukov edited the test plan for this revision. (Show Details)
dvyukov added a reviewer: kcc.
dvyukov added a subscriber: Unknown Object (MLST).

Submitted as r214912.

samsonov added inline comments.
lib/sanitizer_common/sanitizer_thread_registry.cc
221

Can you get rid of this overload completely?

lib/tsan/rtl/tsan_clock.cc
15

Why do you need this #include?

372

Any particular reason for not using initializer list here?

lib/tsan/rtl/tsan_clock.h
47

IIUC Reset() should be called manually before destructor. If that is really required, can you at least describe it in the comment or elsewhere.

124

Why isn't this method called SyncClock::Resize(ClockCache *c, uptr nclk); ?

Fixes are in revision 216900

dvyukov abandoned this revision.Apr 15 2021, 1:19 AM