profile: Add low level versions of profile buffer functions
authorJustin Bogner <mail@justinbogner.com>
Tue, 9 Dec 2014 22:07:25 +0000 (22:07 +0000)
committerJustin Bogner <mail@justinbogner.com>
Tue, 9 Dec 2014 22:07:25 +0000 (22:07 +0000)
commit55248db0c98a5af6df9ee4413fd06dac07553a27
tree90577547364f18bf42ebe45a9ef81aaab5aeee81
parent7f138811cd27f5835e7781d3f1cf0797b26af9b9
profile: Add low level versions of profile buffer functions

On Darwin, compiler_rt uses magic linker symbols to find the profile
counters in the __DATA segment.  This is a reasonable method for
normal, hosted, userspace programs.  However programs with custom
memory layouts, such as the kernel, will need to tell compiler_rt
explicitly where to find these sections.

Patch by Lawrence D'Anna. Thanks!

llvm-svn: 223840
compiler-rt/lib/profile/InstrProfiling.h
compiler-rt/lib/profile/InstrProfilingBuffer.c
compiler-rt/lib/profile/InstrProfilingInternal.h [new file with mode: 0644]