summaryrefslogtreecommitdiff
path: root/lib/profile/InstrProfilingPlatformDarwin.c
diff options
context:
space:
mode:
authorManman Ren <manman.ren@gmail.com>2019-03-08 15:30:56 +0000
committerManman Ren <manman.ren@gmail.com>2019-03-08 15:30:56 +0000
commit3137e93cfd656fb907f6b357bb73c91f901e493a (patch)
tree05254bdd61eea440507d0956716a920280ca148e /lib/profile/InstrProfilingPlatformDarwin.c
parent941c57171e2dc51b3f727117d46ee057bd309915 (diff)
downloadcompiler-rt-3137e93cfd656fb907f6b357bb73c91f901e493a.tar.gz
Reland compiler-rt support for order file instrumentation.
r355343 was landed and was reverted in r355363 due to build breakage. This patch adds Linux/Windows support on top of r355343. In this patch, Darwin should be working with testing case. Linux should be working, I will enable the testing case in a follwup diff. Windows/Other should be building. Correct implementation for Other platforms will be added. Thanks David for reviewing the original diff, helping me with issues on Linux, and giving suggestions for adding support for Other platforms. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@355701 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/profile/InstrProfilingPlatformDarwin.c')
-rw-r--r--lib/profile/InstrProfilingPlatformDarwin.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/profile/InstrProfilingPlatformDarwin.c b/lib/profile/InstrProfilingPlatformDarwin.c
index 6eae73fdc..23bdb7f37 100644
--- a/lib/profile/InstrProfilingPlatformDarwin.c
+++ b/lib/profile/InstrProfilingPlatformDarwin.c
@@ -27,6 +27,9 @@ extern uint64_t
COMPILER_RT_VISIBILITY
extern uint64_t
CountersEnd __asm("section$end$__DATA$" INSTR_PROF_CNTS_SECT_NAME);
+COMPILER_RT_VISIBILITY
+extern uint32_t
+ OrderFileStart __asm("section$start$__DATA$" INSTR_PROF_ORDERFILE_SECT_NAME);
COMPILER_RT_VISIBILITY
extern ValueProfNode
@@ -49,6 +52,8 @@ COMPILER_RT_VISIBILITY
uint64_t *__llvm_profile_begin_counters(void) { return &CountersStart; }
COMPILER_RT_VISIBILITY
uint64_t *__llvm_profile_end_counters(void) { return &CountersEnd; }
+COMPILER_RT_VISIBILITY
+uint32_t *__llvm_profile_begin_orderfile(void) { return &OrderFileStart; }
COMPILER_RT_VISIBILITY
ValueProfNode *__llvm_profile_begin_vnodes(void) {