[PATCH] Change internal allocator in sanitizer tools

Dmitry Vyukov dvyukov at google.com
Mon Apr 29 03:26:32 PDT 2013


please upload it to http://codereview.appspot.com


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



More information about the llvm-commits mailing list