[PATCH] D58997: Order File Instrumentation: dump the data in compiler-rt (Make it work for Linux/Windows etc)
David Li via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Mar 5 14:37:35 PST 2019
davidxl added inline comments.
================
Comment at: lib/profile/InstrProfilingPlatformLinux.c:67
}
+COMPILER_RT_VISIBILITY uint32_t *__llvm_profile_begin_orderfile(void) {
+ return &PROF_ORDERFILE_START;
----------------
manmanren wrote:
> I am getting undefined reference to `__start___llvm_orderfile'. Not quite know where we define these symbols for PROF_CNTS etc.
The cnt, data symbols are created in the related sections. Those symbols are created during instrumentation lowering -- see lib/Transforms/Instrumentation/InstrProfiling.cc
================
Comment at: lib/profile/InstrProfilingPlatformOther.c:88
+COMPILER_RT_VISIBILITY
+uint32_t *__llvm_profile_begin_orderfile(void) { return OrderFileFirst; }
----------------
manmanren wrote:
> Not sure what I should do for PlatformOther :[
For these platforms, you need to add interface to register symbols in orderFile section, and this new interface just track the start and end of the section. The register functions are called during startup. See also lowering pass that generates call to register functions.
Repository:
rCRT Compiler Runtime
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D58997/new/
https://reviews.llvm.org/D58997
More information about the llvm-commits
mailing list