The diff D57530 was accepted and I landed it as r355343. It works fine for Darwin, but caused build breakages for Linux/Windows etc.
This diff adds support for these platforms.
Details
Diff Detail
Event Timeline
lib/profile/InstrProfilingPlatformLinux.c | ||
---|---|---|
67 | I am getting undefined reference to `start_llvm_orderfile'. Not quite know where we define these symbols for PROF_CNTS etc. | |
lib/profile/InstrProfilingPlatformOther.c | ||
88 | Not sure what I should do for PlatformOther :[ | |
lib/profile/InstrProfilingPlatformWindows.c | ||
32 | The windows implementation seems to be working at r355357 (http://lab.llvm.org:8011/builders/sanitizer-windows/builds/42814). |
lib/profile/InstrProfilingPlatformLinux.c | ||
---|---|---|
67 | The cnt, data symbols are created in the related sections. Those symbols are created during instrumentation lowering -- see lib/Transforms/Instrumentation/InstrProfiling.cc | |
lib/profile/InstrProfilingPlatformOther.c | ||
88 | 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. |
lib/profile/InstrProfilingPlatformLinux.c | ||
---|---|---|
67 | The start_xxx and stop_xxx symbols are automatically generated by the linker to reference to the start end stop address of section named 'xxx'. Compiler just need to put things into 'xxx': CounterPtr->setSection( getInstrProfSectionName(IPSK_cnts, TT.getObjectFormat())); | |
lib/profile/InstrProfilingPlatformOther.c | ||
88 | yes, there is also __llvm_profile_register_names_function for name sections. emit the registration call in void InstrProfiling::emitRegistration() {..} |
Thanks!
Manman
lib/profile/InstrProfilingPlatformLinux.c | ||
---|---|---|
67 | In InstrOrderFile.cpp, we have this already: OrderFileBuffer->setSection( getInstrProfSectionName(IPSK_orderfile, TT.getObjectFormat())); This actually works locally on my Linux machine. The buildbot error message was |
lib/profile/InstrProfilingPlatformLinux.c | ||
---|---|---|
41 | When the runtime is linked in but no instrumentation is done, you will need to add a dummy data for order file section here. |
When the runtime is linked in but no instrumentation is done, you will need to add a dummy data for order file section here.