[PATCH] Change internal allocator in sanitizer tools

Alexey Samsonov samsonov at google.com
Fri Apr 26 05:48:09 PDT 2013


FTR one more note: it is critical that all TSan internal allocations are
done using the primary allocator (i.e. don't fall back to mmap). So even
though we may think
of using more compact size class map, it still should be capable of
allocating large enough chunks (of size NThreads * 8 bytes).


On Fri, Apr 26, 2013 at 4:33 PM, Alexey Samsonov <samsonov at google.com>wrote:

> 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
>



-- 
Alexey Samsonov, MSK
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20130426/87dbadde/attachment.html>


More information about the llvm-commits mailing list