[PATCH] Change internal allocator in sanitizer tools

Alexey Samsonov samsonov at google.com
Fri Apr 26 05:33:20 PDT 2013


Attaching the patch for the updated version. It adds thread-local caches
for internal_allocator to TSan threads (in the same way as we do for user
allocations).
users of internal allocator may choose not to provide thread-local cache,
in this case allocation would require a global lock.

Concerns:
* lazy initialization of internal allocator is written using atomics, can
it cause significant contention compared to the global mutex?
* TSan memory usage might increase after this change due to per-thread
caches.

On Mon, Apr 22, 2013 at 1:28 PM, Dmitry Vyukov <dvyukov at google.com> wrote:

>
>   As per offline discussion, Alexey will measure overhead of the single
> mutex on tsan performance. If the slowdown is negligible, we can use it.
> Otherwise we need to think about per-thread caches will all the required
> machinery.
>
> http://llvm-reviews.chandlerc.com/D671



-- 
Alexey Samsonov, MSK
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20130426/b647d83b/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: zdiff.internal_alloc
Type: application/octet-stream
Size: 9904 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20130426/b647d83b/attachment.obj>


More information about the llvm-commits mailing list