Dmitry Vyukov
48e5d4a2d3
tsan: flush symbolizer cache if not symbolized for more than 5 seconds
...
llvm-svn: 177629
2013-03-21 07:02:36 +00:00
Dmitry Vyukov
5e797a8e57
tsan: add a comment about magic numbers
...
llvm-svn: 177628
2013-03-21 06:28:04 +00:00
Dmitry Vyukov
78693730a4
tsan: use a single background thread for memory profiler and memory flush (and later for symbolizer flush)
...
llvm-svn: 177627
2013-03-21 06:24:31 +00:00
Richard Smith
b6f3905450
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.
llvm-svn: 177618
2013-03-21 00:42:03 +00:00
Richard Smith
e86b7b0bb9
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.
llvm-svn: 177606
2013-03-20 23:49:17 +00:00
Bill Wendling
7184d34f96
Add declaration for linux.
...
llvm-svn: 177601
2013-03-20 23:21:08 +00:00
Bill Wendling
51a6ff5799
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>
llvm-svn: 177578
2013-03-20 21:11:47 +00:00
Dmitry Vyukov
6120bac6e6
tsan: correct sizes of signal-related data structures
...
llvm-svn: 177526
2013-03-20 14:57:28 +00:00
Dmitry Vyukov
9f94dff7a6
tsan: add missing stat descriptions
...
llvm-svn: 177523
2013-03-20 14:04:23 +00:00
Dmitry Vyukov
0954e9c01d
tsan: call fflush(0) on exit again
...
llvm-svn: 177522
2013-03-20 14:01:10 +00:00
Dmitry Vyukov
c638a7127e
tsan: reduce size of mutexsets from 64 to 16 mutexes
...
overflow is handled anyway
saves memory because each thread holds 1024 mutexsets
llvm-svn: 177520
2013-03-20 13:50:47 +00:00
Dmitry Vyukov
3330200d92
tsan: fix incorrect test
...
llvm-svn: 177519
2013-03-20 13:49:45 +00:00
Dmitry Vyukov
b62c158d81
tsan: special handling of .rodata (don't try to find races, don't keep shadow, dont' put into traces)
...
llvm-svn: 177517
2013-03-20 13:21:50 +00:00
Dmitry Vyukov
ccbdea956f
tsan: fix build
...
llvm-svn: 177513
2013-03-20 11:22:03 +00:00
Dmitry Vyukov
79915de6af
tsan: move trace header into 0x600000000000 range
...
eliminat thread "dead info" altogether
llvm-svn: 177512
2013-03-20 10:31:53 +00:00
Dmitry Vyukov
b6eace8a2f
tsan: add internal_unlink() function
...
llvm-svn: 177510
2013-03-20 10:28:36 +00:00
Alexey Samsonov
920b3b9a0c
[ASan] Move malloc stats collection away from AsanThreadRegistry class.
...
llvm-svn: 177508
2013-03-20 10:11:24 +00:00
Dmitry Vyukov
31056968fc
asan/tsan: reduce per-thread memory allocator caches
...
256 blocks (which is 512 in reallity) seems to be too big cache,
reducing the size reduces memory consumption but does not degrade performance.
llvm-svn: 177502
2013-03-20 09:26:46 +00:00
Alexey Samsonov
cf025cb2e6
[ASan] Move GetCurrentThread/SetCurrentThread from AsanThreadRegistry class into plain functions: they don't actually use registry
...
llvm-svn: 177501
2013-03-20 09:23:28 +00:00
Dmitry Vyukov
b7c68ee856
tsan: fix flaky test
...
llvm-svn: 177500
2013-03-20 09:22:13 +00:00
Dmitry Vyukov
f6c4a7a2f5
tsan: fix incorrect test
...
llvm-svn: 177499
2013-03-20 09:21:49 +00:00
Evgeniy Stepanov
52b2d13245
[sanitizer] Enable prctl interceptor on Android.
...
llvm-svn: 177497
2013-03-20 07:35:52 +00:00
Bill Wendling
e647659d58
Add a way to register and execute "writeout" functions.
...
It may be prohibitively expensive to write out >1000 files at the same time. So
we would rather emit them serially. These functions allow the GCOV
implementation to register the functions that writeout the GCOV information per
compile unit. At exit, they are written.
<rdar://problem/12439551>
llvm-svn: 177436
2013-03-19 21:01:19 +00:00
Evgeniy Stepanov
9a8f0f55d5
[asan] s/ASAN_POSIX/SANITIZER_POSIX/
...
llvm-svn: 177407
2013-03-19 15:26:41 +00:00
Evgeniy Stepanov
95eaa21637
[sanitizer] More renamed macros.
...
llvm-svn: 177401
2013-03-19 14:54:17 +00:00
Evgeniy Stepanov
0af672326a
[sanitizer] Replace more platform checks with SANITIZER_ constants.
...
llvm-svn: 177400
2013-03-19 14:33:38 +00:00
Evgeniy Stepanov
d3b56605f1
[sanitizer] Move ASan platform macros to sanitizer_common and rename them appropriately.
...
llvm-svn: 177397
2013-03-19 13:54:41 +00:00
Alexey Samsonov
45d2f96582
Don't use --sysroot to linux SDK when building libprofile - SDK on Linux seems to be incomplete.
...
llvm-svn: 177396
2013-03-19 13:34:23 +00:00
Dmitry Vyukov
082afc8346
tsan: fix build
...
llvm-svn: 177395
2013-03-19 13:34:12 +00:00
Dmitry Vyukov
4ecfa696e0
tsan: flush dead thread info earlier (when another thread is finished rather than new thread is created)
...
llvm-svn: 177394
2013-03-19 12:25:48 +00:00
Dmitry Vyukov
9dd06ad47a
tsan: instruct malloc() to consume less memory
...
llvm-svn: 177393
2013-03-19 12:24:19 +00:00
Dmitry Vyukov
f3fde82667
tsan: symbolizer "flush caches" support
...
llvm-svn: 177389
2013-03-19 10:24:01 +00:00
Dmitry Vyukov
29f335ae80
tsan: symbolizer "flush caches" functinality
...
llvm-svn: 177388
2013-03-19 10:23:17 +00:00
Dmitry Vyukov
509dab30ae
tsan: fix memory leak
...
llvm-svn: 177387
2013-03-19 10:22:33 +00:00
Evgeniy Stepanov
6d02c1c598
[sanitizer] Avoid use of uintptr_t.
...
llvm-svn: 177384
2013-03-19 09:39:15 +00:00
Evgeniy Stepanov
b4a218db34
[sanitizer] Don't adjust the size of the user-allocated stack.
...
Moved this code to sanitizer_common.
llvm-svn: 177383
2013-03-19 09:30:52 +00:00
Alexey Samsonov
4c17c1b157
Support CMake build of profile runtime library on Linux
...
llvm-svn: 177382
2013-03-19 09:17:35 +00:00
Dmitry Vyukov
b59fa875ad
tsan: do not allocate sync vars on relaxed atomic operations
...
helps to reduce memory consumption if an atomic is used only with relaxed ops (stats)
llvm-svn: 177381
2013-03-19 09:15:31 +00:00
Richard Smith
807e4dced5
Update ubsan test for clang change r177362.
...
llvm-svn: 177363
2013-03-19 00:04:20 +00:00
Bill Wendling
2428f167f7
Add some GCOV functions that register all of the __llvm_gcov_flush() functions.
...
The __llvm_gcov_flush() functions only work for the local compile unit. However,
when __gcov_flush() is called, the user expects all of the counters to be
flushed, not just the ones in the current compile unit.
This adds some library functions that register the flush functions. It also
defined __gcov_flush() so that loops through that list and calls the functions.
PR15191 & <rdar://problem/13167507>
llvm-svn: 177337
2013-03-18 22:59:47 +00:00
Dmitry Vyukov
4ddd37ba5b
tsan: smaller memory block headers (32b->16b)
...
llvm-svn: 177312
2013-03-18 19:47:36 +00:00
Dmitry Vyukov
61ce9560d4
tsan: add support for idle threads
...
llvm-svn: 177292
2013-03-18 17:21:15 +00:00
Dmitry Vyukov
ce26a0aa92
tsan: touch less shadow memory during operations on big memory ranges
...
greatly reduces memory consumption
llvm-svn: 177289
2013-03-18 16:56:48 +00:00
Dmitry Vyukov
2e7f29f042
tsan: mark shadow for thread stack as "don't need" when thread exits
...
llvm-svn: 177288
2013-03-18 15:49:07 +00:00
Dmitry Vyukov
f123337275
tsan: better memory profiler
...
llvm-svn: 177286
2013-03-18 13:55:33 +00:00
Dmitry Vyukov
15bee188c4
tsan: madvise(DONTNEED) shadow memory on munmap()
...
llvm-svn: 177278
2013-03-18 11:51:51 +00:00
Kostya Serebryany
9138f75d0a
[asan] make the __asan_get_heap_size more robust
...
llvm-svn: 177270
2013-03-18 10:52:25 +00:00
Dmitry Vyukov
20bf8c7778
tsan: move implementation out of h file
...
llvm-svn: 177269
2013-03-18 10:32:21 +00:00
Dmitry Vyukov
49e462fab2
tsan: fix clang -Wall build
...
Clang does not like classes with virtual functions but w/o virtual dtor.
Go does not like libstdc++ (operator delete).
llvm-svn: 177267
2013-03-18 10:10:15 +00:00
Alexey Samsonov
b5d10f69e4
[TSan] re-apply r177249 lost in edits
...
llvm-svn: 177265
2013-03-18 09:45:22 +00:00