diff options
author | Ellis Hoag <ellis.sparky.hoag@gmail.com> | 2021-12-28 13:34:36 -0800 |
---|---|---|
committer | Ellis Hoag <ellis.sparky.hoag@gmail.com> | 2021-12-28 14:20:59 -0800 |
commit | 18ffb5dc2503c81df53274d6a2e1945ac08c56d2 (patch) | |
tree | d9988687d4c8076ec131735e0f1f98b69e803e4c /llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp | |
parent | 1c6b740d4b1bb8f74c8eb2fa38b21d684d32ca75 (diff) | |
download | llvm-18ffb5dc2503c81df53274d6a2e1945ac08c56d2.zip llvm-18ffb5dc2503c81df53274d6a2e1945ac08c56d2.tar.gz llvm-18ffb5dc2503c81df53274d6a2e1945ac08c56d2.tar.bz2 |
[InstrProf] Prevent duplicate functions in correlated data
When using debug info for profile correlation, avoid adding duplicate
functions in the synthetic Data section.
Before this patch, n duplicate function entries in the Data section would
cause counter values to be a factor of n larger. I built instrumented
clang with and without debug info correlation and got these summaries.
```
# With Debug Info Correlate
$ llvm-profdata show default.profdata
Instrumentation level: IR entry_first = 0
Total functions: 182530
Maximum function count: 52034
Maximum internal block count: 5763
# Without
$ llvm-profdata show default.profdata
Instrumentation level: IR entry_first = 0
Total functions: 183212
Maximum function count: 52034
Maximum internal block count: 5766
```
The slight difference in counts seem to be mostly from FileSystem and
Map functions and the difference in the number of instrumented functions
seems to come from missing debug info like destructors without source.
Reviewed By: kyulee
Differential Revision: https://reviews.llvm.org/D116051
Diffstat (limited to 'llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp')
0 files changed, 0 insertions, 0 deletions