[PATCH] D58997: Order File Instrumentation: dump the data in compiler-rt (Make it work for Linux/Windows etc)

Manman Ren via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Mar 6 13:33:31 PST 2019


manmanren marked 2 inline comments as done.
manmanren added inline comments.


================
Comment at: lib/profile/InstrProfilingPlatformLinux.c:67
 }
+COMPILER_RT_VISIBILITY uint32_t *__llvm_profile_begin_orderfile(void) {
+  return &PROF_ORDERFILE_START;
----------------
davidxl wrote:
> 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
I can't find INSTR_PROF_SECT_START or "__start_" in InstrProfiling.cpp. Can you provide a bit more info? Thanks!


================
Comment at: lib/profile/InstrProfilingPlatformOther.c:88
+COMPILER_RT_VISIBILITY
+uint32_t *__llvm_profile_begin_orderfile(void) { return OrderFileFirst; }
 
----------------
davidxl wrote:
> 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.
Is __llvm_profile_register_function the one? Should we add a new function for orderFile section?


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