summaryrefslogtreecommitdiff
path: root/lib
AgeCommit message (Collapse)Author
2014-03-19PGO: Splitting implementation files; no functionality changeDuncan P. N. Exon Smith
Split implementation files along a uses-libc/shouldn't-use-libc boundary. - InstrProfiling.h is a shared header. - InstrProfiling.c provides an API to extract profiling data from the runtime, but avoids the use of libc. Currently this is a lie: __llvm_pgo_write_buffer() uses `FILE*` and related functions. It will be updated soon to write to a `char*` buffer instead. - InstrProfilingExtras.c provides a more convenient API for interfacing with the profiling runtime, but has logic that does (and will continue to) use libc. <rdar://problem/15943240> git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@204268 91177308-0d34-0410-b5e6-96231b3b80d8
2014-03-19PGO: Fix obviously wrong typedefs for MSDuncan P. N. Exon Smith
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@204267 91177308-0d34-0410-b5e6-96231b3b80d8
2014-03-19tsan: add test for second_deadlock_stack flagDmitry Vyukov
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@204240 91177308-0d34-0410-b5e6-96231b3b80d8
2014-03-19[CMake] Fix build of ASan tests on MacAlexey Samsonov
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@204238 91177308-0d34-0410-b5e6-96231b3b80d8
2014-03-19[sanitizer] use some c++11 to simplify the code (we can now). Fix one place ↵Kostya Serebryany
where a mutex acquisition stack trace was not properly remembered git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@204237 91177308-0d34-0410-b5e6-96231b3b80d8
2014-03-19[CMake] Build sanitizer unit tests with -std=c++11Alexey Samsonov
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@204234 91177308-0d34-0410-b5e6-96231b3b80d8
2014-03-19[sanitizer] when recycling deadlock graph nodes, properly recycle edgesKostya Serebryany
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@204233 91177308-0d34-0410-b5e6-96231b3b80d8
2014-03-19tsan: use attribute instead of compiler flag for tls-model=initial-exec as ↵Dmitry Vyukov
asked in comments for r203111 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@204232 91177308-0d34-0410-b5e6-96231b3b80d8
2014-03-19tsan: fix copy-pasted commentDmitry Vyukov
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@204231 91177308-0d34-0410-b5e6-96231b3b80d8
2014-03-19tsan: preliminary support for Go deadlock detectorDmitry Vyukov
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@204228 91177308-0d34-0410-b5e6-96231b3b80d8
2014-03-19tsan: fix large stack frame in deadlock detectorDmitry Vyukov
In member function 'virtual void __sanitizer::DD::MutexBeforeLock(__sanitizer::DDCallback*, __sanitizer::DDMutex*, bool)': error: the frame size of 544 bytes is larger than 512 bytes [-Werror=frame-larger-than=] The code is now [arguably] better as well. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@204227 91177308-0d34-0410-b5e6-96231b3b80d8
2014-03-19[sanitizer] deadlock detector: a) initial support for suppressions, b) be ↵Kostya Serebryany
more robust in case we failed to extract a stack trace for one of the locks git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@204225 91177308-0d34-0410-b5e6-96231b3b80d8
2014-03-19[ASan] Print mmap errno/GetLastError in a readable and consistent wayTimur Iskhodzhanov
Reviewed at http://llvm-reviews.chandlerc.com/D3107 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@204218 91177308-0d34-0410-b5e6-96231b3b80d8
2014-03-18Don't take short cuts trying to avoid conditionals. This leads toJoerg Sonnenberger
negative shift amounts and/or shifts wider than the type. VAX traps on the former, X86 and other platforms produce incorrect results on the latter. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@204193 91177308-0d34-0410-b5e6-96231b3b80d8
2014-03-18profile: Include the function hash in PGO profilesJustin Bogner
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@204185 91177308-0d34-0410-b5e6-96231b3b80d8
2014-03-18SpacingJoerg Sonnenberger
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@204179 91177308-0d34-0410-b5e6-96231b3b80d8
2014-03-18[sanitizer] Fix a bug in AdjustStackSize().Sergey Matveev
If the user requests OS default stack size, do not adjust it to our minimum stack size (which is usually much less than the OS default). git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@204173 91177308-0d34-0410-b5e6-96231b3b80d8
2014-03-18tsan: fix malloc/munmap mismatchDmitry Vyukov
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@204154 91177308-0d34-0410-b5e6-96231b3b80d8
2014-03-18[msan] Origin tracking with history, compiler-rt part.Evgeniy Stepanov
Compiler-rt part of MSan implementation of advanced origin tracking, when we record not only creation point, but all locations where an uninitialized value was stored to memory, too. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@204152 91177308-0d34-0410-b5e6-96231b3b80d8
2014-03-18tsan: deadlock detector: add deadlock detector flagsDmitry Vyukov
the first flags is to enable printing of the second stack per edge git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@204150 91177308-0d34-0410-b5e6-96231b3b80d8
2014-03-18tsan: deadlock detector: print 2 stacks per deadlock edgeDmitry Vyukov
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@204149 91177308-0d34-0410-b5e6-96231b3b80d8
2014-03-18tsan: addrhashmap: fix bug with initialization of addresses in add arrayDmitry Vyukov
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@204148 91177308-0d34-0410-b5e6-96231b3b80d8
2014-03-18tsan: deadlock detector: add ability to ignore destruction of global mutexesDmitry Vyukov
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@204146 91177308-0d34-0410-b5e6-96231b3b80d8
2014-03-18tsan: lazily initialize deadlock detector runtimeDmitry Vyukov
this is necessaary because dlsym can call malloc, which can lock mutexes that we intercept git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@204141 91177308-0d34-0410-b5e6-96231b3b80d8
2014-03-18Fix -Werror buildAlexey Samsonov
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@204139 91177308-0d34-0410-b5e6-96231b3b80d8
2014-03-18tsan: support up to 1<<20 mutexes in standalone deadlock detectorDmitry Vyukov
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@204127 91177308-0d34-0410-b5e6-96231b3b80d8
2014-03-18tsan: better addr->object hashmapDmitry Vyukov
still experimental git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@204126 91177308-0d34-0410-b5e6-96231b3b80d8
2014-03-18tsan: add missing interceptor for embed symbolizerDmitry Vyukov
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@204124 91177308-0d34-0410-b5e6-96231b3b80d8
2014-03-18[sanitizer] a bit more informative deadlock detector report (still lots to ↵Kostya Serebryany
improve) git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@204115 91177308-0d34-0410-b5e6-96231b3b80d8
2014-03-17Reapply "PGO: Statically generate data structures"Duncan P. N. Exon Smith
Reapply r204079 and r204083, this time with stubs for fputc in compiler-rt. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@204091 91177308-0d34-0410-b5e6-96231b3b80d8
2014-03-17Revert r204079, r204083 and r204084 "PGO: Statically generate data structures"Duncan P. N. Exon Smith
Buildbots are having trouble finding fputc(), and I can't figure out why. Reverting to investigate. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@204088 91177308-0d34-0410-b5e6-96231b3b80d8
2014-03-17Switch from fputc to putc to fix r204079?Duncan P. N. Exon Smith
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@204084 91177308-0d34-0410-b5e6-96231b3b80d8
2014-03-17Rename __ProfileData to __llvm_pgo_dataDuncan P. N. Exon Smith
<rdar://problem/15943240> git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@204083 91177308-0d34-0410-b5e6-96231b3b80d8
2014-03-17PGO: Statically generate data structuresDuncan P. N. Exon Smith
In instrumentation-based profiling, we need a set of data structures to represent the counters. Previously, these were built up during static initialization. Now, they're shoved into a specially-named section so that they show up as an array. As a consequence of the reorganizing symbols, instrumentation data structures for linkonce functions are now correctly coalesced. This is the first step in a larger project to minimize runtime overhead and dependencies in instrumentation-based profilng. The larger picture includes removing all initialization overhead and making the dependency on libc optional. <rdar://problem/15943240> git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@204079 91177308-0d34-0410-b5e6-96231b3b80d8
2014-03-17[sanitizer] fix the deadlock detector buildKostya Serebryany
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@204044 91177308-0d34-0410-b5e6-96231b3b80d8
2014-03-17[sanitizer] reverse the order of the stack traces printed for every pair of ↵Kostya Serebryany
locks in the deadlock report (first print the 'from' node, then print the 'to' node of the deadlock graph) git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@204043 91177308-0d34-0410-b5e6-96231b3b80d8
2014-03-17[sanitizer] make the deadlock detector print 2*N stack traces on ↵Kostya Serebryany
lock-order-inversion with N locks (i.e. print stack traces for both lock acquisitions in every edge in the graph). More improvements to follow git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@204042 91177308-0d34-0410-b5e6-96231b3b80d8
2014-03-17[sanitizer] allow to store the lock context (stack trace id) with all ↵Kostya Serebryany
currently held locks in a thread. This will allow the deadlock detector to provide better warnings (more changes to go) git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@204039 91177308-0d34-0410-b5e6-96231b3b80d8
2014-03-17[tsan] fox the GO buildKostya Serebryany
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@204037 91177308-0d34-0410-b5e6-96231b3b80d8
2014-03-17[sanitizer] fix build warnings; add an output test for the deadlock detecorKostya Serebryany
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@204035 91177308-0d34-0410-b5e6-96231b3b80d8
2014-03-17[sanitizer] print more stack traces when reporting a deadlock (even more to ↵Kostya Serebryany
come) git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@204034 91177308-0d34-0410-b5e6-96231b3b80d8
2014-03-17tsan: yet another attempt to fix pthread_cond interceptorsDmitry Vyukov
Make behavior introduced in r202820 conditional (under legacy_pthread_cond flag). The new issue that we've hit with the satellite pthread_cond_t struct is that pthread_condattr_getpshared does not work (satellite data is not shared between processes). The idea is that most processes do not use pthread 2.2.5. The rare ones that use (2.2.5 is dated by 2002) must specify legacy_pthread_cond=1 on their own risk. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@204032 91177308-0d34-0410-b5e6-96231b3b80d8
2014-03-17[sanitizer] make real_pthread_attr_getstack extern "C"Kostya Serebryany
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@204029 91177308-0d34-0410-b5e6-96231b3b80d8
2014-03-14[ASan] Remove the unneeded ASAN_RUNTIME_LDFLAGS.Alexander Potapenko
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@203913 91177308-0d34-0410-b5e6-96231b3b80d8
2014-03-14[sanitizer] fully implement racy fast path in bitset-based deadlock detectorKostya Serebryany
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@203910 91177308-0d34-0410-b5e6-96231b3b80d8
2014-03-14[sanitizer] partially implement racy fast path in bitset-based deadlock detectorKostya Serebryany
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@203904 91177308-0d34-0410-b5e6-96231b3b80d8
2014-03-14[sanitizer] in bitset-based deadlock detector collect edge's stack trace ↵Kostya Serebryany
when an edge is added to the graph (in following CLs these stack traces will be added to the report) git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@203902 91177308-0d34-0410-b5e6-96231b3b80d8
2014-03-13[sanitizer] in bitvector-based deadlock detector split onLock into ↵Kostya Serebryany
onLockBefore and onLockAfter hooks git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@203796 91177308-0d34-0410-b5e6-96231b3b80d8
2014-03-13[msan] Test for aggregates passing through ellipsis.Evgeniy Stepanov
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@203795 91177308-0d34-0410-b5e6-96231b3b80d8
2014-03-13[TSan] Hide message about re-execing under verbosity flagAlexey Samsonov
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@203793 91177308-0d34-0410-b5e6-96231b3b80d8