[llvm] [llvm-profgen] Loading binary functions from .symtab when DWARF info is incomplete (PR #163654)
Lei Wang via llvm-commits
llvm-commits at lists.llvm.org
Tue Oct 28 13:03:23 PDT 2025
================
@@ -65,6 +65,13 @@ static cl::list<std::string> DisassembleFunctions(
"names only. Only work with show-disassembly-only"),
cl::cat(ProfGenCategory));
+static cl::opt<bool>
+ LoadFunctionFromSymbol("load-function-from-symbol", cl::init(true),
----------------
wlei-llvm wrote:
Yeah, iirc, we initially only loaded the function ranges from symbol table, then after we found the issue with the multi-version function(foo.cold, foo.resume...), we redesigned and fully switched to load the symbol from dwarf.
At that time, the code was implemented inside the `dissassembleSymbol`(which also iterates the symbols),
https://github.com/llvm/llvm-project/blob/main/llvm/tools/llvm-profgen/ProfiledBinary.cpp#L529
https://github.com/llvm/llvm-project/pull/163654
More information about the llvm-commits
mailing list