1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-25 12:12:47 +01:00
llvm-mirror/test
Hongtao Yu 45a66978f9 [CSSPGO] Report zero-count probe in profile instead of dangling probes.
Previously dangling samples were represented by INT64_MAX in sample profile while probes never executed were not reported. This was based on an observation that dangling probes were only at a smaller portion than zero-count probes. However, with compiler optimizations, dangling probes end up becoming at large portion of all probes in general and reporting them does not make sense from profile size point of view. This change flips sample reporting by reporting zero-count probes instead. This enabled dangling probe to be represented by none (missing entry in profile). This has a couple benefits:

1. Reducing sample profile size in optimize mode, even when the number of non-executed probes outperform the number of dangling probes, since INT64_MAX takes more space over 0 to encode.

2. Binary size savings. No need to encode dangling probe anymore, since missing probes are treated as dangling in the profile reader.

3. Reducing compiler work to track dangling probes. However, for probes that are real dead and removed, we still need the compiler to identify them so that they can be reported as zero-count, instead of mistreated as dangling probes.

4. Improving counts quality by respecting the counts already collected on the non-dangling copy of a probe. A probe, when duplicated, gets two copies at runtime. If one of them is dangling while the other is not, merging the two probes at profile generation time will cause the real samples collected on the non-dangling one to be discarded. Not reporting the dangling counterpart will keep the real samples.

5. Better readability.

6. Be consistent with non-CS dwarf line number based profile. Zero counts are trusted by the compiler counts inferencer while missing counts will be inferred by the compiler.

Note that the current patch does include any work for #3. There will be follow-up changes.

For #1, I've seen for a large Facebook service, the text profile is reduced by 7%. For extbinary profile, the size of  LBRProfileSection is reduced by 35%.

For #4, I have seen general counts quality for SPEC2017 is improved by 10%.

Reviewed By: wenlei, wlei, wmi

Differential Revision: https://reviews.llvm.org/D104129
2021-06-16 11:45:29 -07:00
..
Analysis [CostModel][AArch64] Improve the cost estimate of CTPOP intrinsic 2021-06-11 11:15:46 +01:00
Assembler [OpaquePtr] Verify Opaque pointer in function parameter 2021-06-15 14:57:48 -07:00
Bindings
Bitcode [OpaquePtr] Create new bitcode encoding for atomicrmw 2021-05-25 16:30:34 -07:00
BugPoint
CodeGen [M68k][GloballSel] Adding initial GlobalISel infrastructure 2021-06-16 10:48:38 -06:00
DebugInfo [IROutliner] Adding DebugInfo handling for IR Outlined Functions 2021-06-15 10:57:08 -05:00
Demangle [Demangle][Rust] Parse const backreferences 2021-06-08 10:01:50 +02:00
Examples
ExecutionEngine [JITLink][MachO] Add missing testcase. 2021-06-13 20:43:49 +10:00
Feature
FileCheck Fix PR46880: Fail CHECK-NOT with undefined variable 2021-04-20 14:42:46 +01:00
Instrumentation [DFSan] Handle landingpad inst explicitly as zero shadow. 2021-06-15 18:28:20 -07:00
Integer
JitListener Revert "[NFC] remove explicit default value for strboolattr attribute in tests" 2021-05-24 19:43:40 +02:00
Linker [IR] make -warn-frame-size into a module attr 2021-06-10 16:15:27 -07:00
LTO LTO: Export functions referenced by non-canonical CFI jump tables 2021-06-08 14:57:43 -07:00
MachineVerifier
MC [PowerPC] Export 16 byte load-store instructions 2021-06-15 01:56:10 +00:00
Object Reland "[AMDGPU] Add gfx1013 target" 2021-06-08 21:15:35 -04:00
ObjectYAML
Other [NewPM] Remove SpeculateAroundPHIs pass 2021-06-15 20:35:55 +03:00
SafepointIRVerifier
Support
SymbolRewriter
TableGen
ThinLTO/X86 [LTO] Support new PM in ThinLTOCodeGenerator. 2021-06-09 10:05:14 +01:00
tools [CSSPGO] Report zero-count probe in profile instead of dangling probes. 2021-06-16 11:45:29 -07:00
Transforms [CSSPGO] Report zero-count probe in profile instead of dangling probes. 2021-06-16 11:45:29 -07:00
Unit
Verifier [OpaquePtr] Verify Opaque pointer in function parameter 2021-06-15 14:57:48 -07:00
YAMLParser
.clang-format
CMakeLists.txt Revert "[IRSim] Adding basic implementation of llvm-sim." 2021-06-11 15:44:19 -05:00
lit.cfg.py Revert "[IRSim] Adding basic implementation of llvm-sim." 2021-06-11 15:44:19 -05:00
lit.site.cfg.py.in Fix lld macho standalone build by including llvm/Config/llvm-config.h instead of llvm/Config/config.h 2021-05-19 11:15:07 -04:00
TestRunner.sh