[all-commits] [llvm/llvm-project] 240a0d: [llvm-profgen] Loading binary functions from .symt...
HighW4y2H3ll via All-commits
all-commits at lists.llvm.org
Wed Dec 3 14:34:16 PST 2025
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 240a0d1bfb2e5ea014a8cd62a171e1722db53600
https://github.com/llvm/llvm-project/commit/240a0d1bfb2e5ea014a8cd62a171e1722db53600
Author: HighW4y2H3ll <zhenghaohuu at gmail.com>
Date: 2025-12-03 (Wed, 03 Dec 2025)
Changed paths:
M llvm/include/llvm/MC/MCPseudoProbe.h
M llvm/include/llvm/ProfileData/SampleProf.h
A llvm/test/tools/llvm-profgen/Inputs/missing-dwarf.exe
A llvm/test/tools/llvm-profgen/missing-dwarf.test
M llvm/tools/llvm-profgen/Options.h
M llvm/tools/llvm-profgen/PerfReader.cpp
M llvm/tools/llvm-profgen/ProfileGenerator.cpp
M llvm/tools/llvm-profgen/ProfiledBinary.cpp
M llvm/tools/llvm-profgen/ProfiledBinary.h
Log Message:
-----------
[llvm-profgen] Loading binary functions from .symtab when DWARF info is incomplete (#163654)
Indexing in .debug_str section could lead to integer overflow when in
DWARF32 format.
https://github.com/llvm/llvm-project/blob/e61e6251b692ffe71910bad22b82e41313f003cf/llvm/lib/DWP/DWP.cpp#L35C30-L35C47
This can lead to missing symbols from the DWARF info, and hurts profile
quality. As a workaround, we may use information from the symbol table
(.symtab), and recover the missing symbols with addresses and ranges.
Output:
```
# Before
...
warning: 6.64%(338916009/5106344252) of samples are from ranges that do not belong to any functions.
# After
...
warning: 0.07%(3501587/4906133148) of samples are from ranges that do not belong to any functions.
warning: 5.71%(280266919/4906133148) of samples are from ranges that belong to functions recovered from symbol table.
```
We see 0.4% - 1.35% performance improvements on our internal services
where profiles are generated with binaries that have .debug_str section
over 4GB.
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list