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
Evgeniy Stepanov
6488b2b257
[asan] Switch to allocator2 on Android.
...
llvm-svn: 177263
2013-03-18 09:22:58 +00:00
Dmitry Vyukov
a1bdd2d942
tsan: fix memory leak
...
llvm-svn: 177262
2013-03-18 09:09:41 +00:00
Dmitry Vyukov
7cd2025c4d
tsan: use StackDepot for thread creation stacks
...
llvm-svn: 177261
2013-03-18 09:02:27 +00:00
Dmitry Vyukov
50160030e1
tsan: fix Go build
...
llvm-svn: 177260
2013-03-18 08:52:46 +00:00
Dmitry Vyukov
a221620b2e
tsan: use StackDepot in sync object to store creation stacks
...
llvm-svn: 177258
2013-03-18 08:27:47 +00:00
Dmitry Vyukov
6f7ca81cce
tsan: fix huge stack frames
...
llvm-svn: 177255
2013-03-18 08:09:42 +00:00
Kostya Serebryany
c4722a65a5
[asan] while generating the description of a global variable, emit the module name in a separate field, thus not duplicating this information if every description. This decreases the binary size (observed up to 3%). https://code.google.com/p/address-sanitizer/issues/detail?id=168 . This changes the asan API version. compiler-rt part, llvm-part will follow
...
llvm-svn: 177253
2013-03-18 08:04:55 +00:00
Dmitry Vyukov
0f2c7ea5d0
tsan: fix lint warnings
...
llvm-svn: 177251
2013-03-18 07:58:20 +00:00
Alexey Samsonov
cbed82ea70
[TSan] fix undefined variable in debug TSan build
...
llvm-svn: 177249
2013-03-18 07:33:00 +00:00
Alexey Samsonov
4f1c8a13d5
[TSan] Use ThreadRegistry::FindThreadContextLocked() to find thread by its stack/tls address.
...
llvm-svn: 177248
2013-03-18 07:02:08 +00:00
Alexey Samsonov
e1955b851d
[TSan] Makefiles: allow configurable paths to clang and FileCheck. Add -fno-rtti flag.
...
llvm-svn: 177247
2013-03-18 07:00:36 +00:00
Alexey Samsonov
f9dbbda5bc
[Sanitizer] Get rid of global mutexes in StopTheWorld implementation
...
llvm-svn: 177246
2013-03-18 06:27:13 +00:00
Alexey Samsonov
e25c72958a
[Sanitizer] Rely on template argument deduction in sanitizer_allocator_test
...
llvm-svn: 177245
2013-03-18 06:07:44 +00:00
Alexander Potapenko
845b575370
[libsanitizer] StopTheWorld in sanitizer_common
...
StopTheWorld puts the process in a suspended state before running the
user-supplied callback. To be used in TSan and in leak checking code.
Linux implementation provided.
Patch by Sergey Matveev (earthdok@google.com )
llvm-svn: 177156
2013-03-15 14:37:21 +00:00
Alexey Samsonov
3a6b6b9d55
[Sanitizer] Don't intercept frexpf and frexpl on Windows. Add frexp declaration to asan_intercepted_functions.h
...
llvm-svn: 177155
2013-03-15 14:02:21 +00:00
Alexey Samsonov
9aecdfe34d
[TSan] Switch TSan runtime to use ThreadRegistry class from sanitizer_common
...
llvm-svn: 177154
2013-03-15 13:48:44 +00:00
Alexey Samsonov
e4385c4b98
[Sanitizer] Don't link tests with -lpthread on Android.
...
llvm-svn: 177151
2013-03-15 12:54:01 +00:00
Kostya Serebryany
96a7620f3a
[sanitizer] fix gcc build warnings
...
llvm-svn: 177149
2013-03-15 12:27:52 +00:00
Kostya Serebryany
b941a2fca4
[asan] Add ForEachChunk() to sanitizer allocators. Patch by Sergey Matveev
...
llvm-svn: 177147
2013-03-15 11:39:41 +00:00
Alexey Samsonov
cdd46d9ccc
[Sanitizer] Generalize compile/link flags for sanitizer_common tests on Android and on other platforms.
...
llvm-svn: 177146
2013-03-15 10:39:26 +00:00
Alexey Samsonov
337b0fcf9c
[Sanitizer] Build sanitizer_common tests w/o RTTI. Move ThreadRegistry class members below methods.
...
llvm-svn: 177143
2013-03-15 07:08:52 +00:00
Eric Christopher
d3c993b396
Fix a virtual destructor warning.
...
Patch by Manuel Klimek!
llvm-svn: 177132
2013-03-15 00:20:17 +00:00