PGO: Statically generate data structures

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
Rename __ProfileData to __llvm_pgo_data

<rdar://problem/15943240>

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@204083 91177308-0d34-0410-b5e6-96231b3b80d8
Switch from fputc to putc to fix r204079?

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@204084 91177308-0d34-0410-b5e6-96231b3b80d8
Revert r204079, r204083 and r204084 "PGO: Statically generate data structures"

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
Reapply "PGO: Statically generate data structures"

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
[sanitizer] a bit more informative deadlock detector report (still lots to improve)

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



git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@204119 91177308-0d34-0410-b5e6-96231b3b80d8
tsan: add missing interceptor for embed symbolizer



git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@204124 91177308-0d34-0410-b5e6-96231b3b80d8
tsan: better addr->object hashmap
still experimental



git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@204126 91177308-0d34-0410-b5e6-96231b3b80d8
tsan: support up to 1<<20 mutexes in standalone deadlock detector



git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@204127 91177308-0d34-0410-b5e6-96231b3b80d8
Move Android ucontext.h out of third_party.

Google is re-licensing this code under the standard dual license of
compiler-rt.


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

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@204139 91177308-0d34-0410-b5e6-96231b3b80d8
tsan: lazily initialize deadlock detector runtime
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
[CMake] Build compiler-rt libraries with -std=c++11

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@204145 91177308-0d34-0410-b5e6-96231b3b80d8
tsan: deadlock detector: add ability to ignore destruction of global mutexes


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@204146 91177308-0d34-0410-b5e6-96231b3b80d8
tsan: addrhashmap: fix bug with initialization of addresses in add array



git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@204148 91177308-0d34-0410-b5e6-96231b3b80d8
tsan: deadlock detector: print 2 stacks per deadlock edge



git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@204149 91177308-0d34-0410-b5e6-96231b3b80d8
tsan: deadlock detector: add deadlock detector flags
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
[msan] Origin tracking with history, compiler-rt part.

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
tsan: fix malloc/munmap mismatch



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