[compiler-rt] [llvm] [TypeProf][InstrFDO]Omit vtable symbols in indexed profiles by default (PR #96520)
Mingming Liu via llvm-commits
llvm-commits at lists.llvm.org
Tue Jun 25 11:36:40 PDT 2024
minglotus-6 wrote:
> > The indexed iFDO profiles contains compressed vtable names
>
> To clarify, are we currently including both compressed and uncompressed vtable names in the indexed profiles?
Not really. Either zlib-compressed or non-compressed vtable names are stored, depending on `compression::zlib::isAvailable` return value around these lines (https://github.com/llvm/llvm-project/blob/fef144cebb378f550ef098d370316554d647f625/llvm/lib/ProfileData/InstrProfWriter.cpp#L809-L814).
`InstrProfWriter::writeVTableNames` ([source](https://github.com/llvm/llvm-project/blob/fef144cebb378f550ef098d370316554d647f625/llvm/lib/ProfileData/InstrProfWriter.cpp#L804C7-L804C12)) will write the vtable payload in the following format
1) length of the payload ([source](https://github.com/llvm/llvm-project/blob/fef144cebb378f550ef098d370316554d647f625/llvm/lib/ProfileData/InstrProfWriter.cpp#L816C18-L819))
2) one `std::string` named `CompressedVTableNames` ([source](https://github.com/llvm/llvm-project/blob/fef144cebb378f550ef098d370316554d647f625/llvm/lib/ProfileData/InstrProfWriter.cpp#L819)).
3) padding ([source](https://github.com/llvm/llvm-project/blob/fef144cebb378f550ef098d370316554d647f625/llvm/lib/ProfileData/InstrProfWriter.cpp#L825-L830); this mostly follow the binary-id [section](https://github.com/llvm/llvm-project/blob/fef144cebb378f550ef098d370316554d647f625/llvm/lib/ProfileData/InstrProfWriter.cpp#L941-L944))
With this change `--keep-vtable-symbols=true`, the CompressedVTableNames is empty, length is zero and there is no padding. But the indexed profile format remains unchanged.
https://github.com/llvm/llvm-project/pull/96520
More information about the llvm-commits
mailing list