[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:06 PDT 2025
================
@@ -820,6 +830,54 @@ void ProfiledBinary::populateSymbolAddressList(const ObjectFile *Obj) {
}
}
+void ProfiledBinary::populateSymbolsFromBinary(const ObjectFile *Obj) {
+ // Load binary functions from symbol table when Debug info is incomplete
+ const SmallVector<StringRef> Suffixes(
----------------
wlei-llvm wrote:
nit: `SmallVector<StringRef>` -> `SmallVector<StringRef, 5>`
IIUC, the default N is 4 for inlined elements., https://llvm.org/docs/ProgrammersManual.html#llvm-adt-smallvector-h
> In the absence of a well-motivated choice for the number of inlined elements N, it is recommended to use SmallVector<T> (that is, omitting the N). This will choose a default number of inlined elements reasonable for allocation on the stack (for example, trying to keep sizeof(SmallVector<T>) around 64 bytes).
https://github.com/llvm/llvm-project/pull/163654
More information about the llvm-commits
mailing list