[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.
Welcome to the LLVM project!
This repository contains the source code for LLVM, a toolkit for the construction of highly optimized compilers, optimizers, and run-time environments.
The LLVM project has multiple components. The core of the project is itself called “LLVM”. This contains all of the tools, libraries, and header files needed to process intermediate representations and convert them into object files. Tools include an assembler, disassembler, bitcode analyzer, and bitcode optimizer.
C-like languages use the Clang frontend. This component compiles C, C++, Objective-C, and Objective-C++ code into LLVM bitcode -- and from there into object files, using LLVM.
Other components include: the libc++ C++ standard library, the LLD linker, and more.
Consult the Getting Started with LLVM page for information on building and running LLVM.
For information on how to contribute to the LLVM project, please take a look at the Contributing to LLVM guide.
Join the LLVM Discourse forums, Discord chat, LLVM Office Hours or Regular sync-ups.
The LLVM project has adopted a code of conduct for participants to all modes of communication within the project.