[ASan] Move malloc stats collection away from AsanThreadRegistry class.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@177508 91177308-0d34-0410-b5e6-96231b3b80d8
tsan: add internal_unlink() function



git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@177510 91177308-0d34-0410-b5e6-96231b3b80d8
tsan: move trace header into 0x600000000000 range
eliminat thread "dead info" altogether



git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@177512 91177308-0d34-0410-b5e6-96231b3b80d8
tsan: fix build


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@177513 91177308-0d34-0410-b5e6-96231b3b80d8
tsan: special handling of .rodata (don't try to find races, don't keep shadow, dont' put into traces)



git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@177517 91177308-0d34-0410-b5e6-96231b3b80d8
tsan: fix incorrect test 



git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@177519 91177308-0d34-0410-b5e6-96231b3b80d8
tsan: reduce size of mutexsets from 64 to 16 mutexes
overflow is handled anyway
saves memory because each thread holds 1024 mutexsets



git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@177520 91177308-0d34-0410-b5e6-96231b3b80d8
tsan: call fflush(0) on exit again


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@177522 91177308-0d34-0410-b5e6-96231b3b80d8
tsan: add missing stat descriptions


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@177523 91177308-0d34-0410-b5e6-96231b3b80d8
tsan: correct sizes of signal-related data structures


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@177526 91177308-0d34-0410-b5e6-96231b3b80d8
Create a coverage initialization function.

This function replaces the call of `atexit' from being generated in the compile
units. Basically, it registers the "writeout" and "flush" functions (if
present). It will generate calls to the `atexit' function for cleanups and final
writeout functions, but only once. This is better than checking for `main',
because a library may not have a `main' function in it.
<rdar://problem/12439551>


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@177578 91177308-0d34-0410-b5e6-96231b3b80d8
Add declaration for linux.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@177601 91177308-0d34-0410-b5e6-96231b3b80d8
Split ubsan runtime into three pieces (compiler-rt part):
 * libclang_rt-san-* is sanitizer_common, and is linked in only if no other
   sanitizer runtime is present.
 * libclang_rt-ubsan-* is the piece of the runtime which doesn't depend on
   a C++ ABI library, and is always linked in.
 * libclang_rt-ubsan_cxx-* is the piece of the runtime which depends on a
   C++ ABI library, and is only linked in when linking a C++ binary.

The Darwin ubsan runtime is unchanged.

For more details, see Clang change r177605.


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@177606 91177308-0d34-0410-b5e6-96231b3b80d8
Per discussion on cxx-abi-dev, switch from comparing type_info objects to
comparing type_info names, since the latter have better uniqueness guarantees
in practice.


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@177618 91177308-0d34-0410-b5e6-96231b3b80d8
tsan: use a single background thread for memory profiler and memory flush (and later for symbolizer flush)



git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@177627 91177308-0d34-0410-b5e6-96231b3b80d8
tsan: add a comment about magic numbers


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@177628 91177308-0d34-0410-b5e6-96231b3b80d8
tsan: flush symbolizer cache if not symbolized for more than 5 seconds



git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@177629 91177308-0d34-0410-b5e6-96231b3b80d8