aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/CodeGen/CodeGenModule.cpp
diff options
context:
space:
mode:
authorMichael O'Farrell <micpof@gmail.com>2024-10-22 16:01:13 -0700
committerGitHub <noreply@github.com>2024-10-22 16:01:13 -0700
commitb4fcaa137f057e68a9011b26c11627a16a8c9374 (patch)
tree24ca0aac43253946528d2ca14a545382c776995d /clang/lib/CodeGen/CodeGenModule.cpp
parent2e0506f83bfde6db93454bdf28e4a71c160d4f5b (diff)
downloadllvm-b4fcaa137f057e68a9011b26c11627a16a8c9374.zip
llvm-b4fcaa137f057e68a9011b26c11627a16a8c9374.tar.gz
llvm-b4fcaa137f057e68a9011b26c11627a16a8c9374.tar.bz2
[PGO][SampledInstr] Correct off by 1s and allow 100% sampling (#113350)
This corrects a couple off by ones related to the sampling of **instrumented** counters, and enables setting 100% rates for burst sampling (burst duration = period). Off by ones: Prior to this change it was impossible to set a period of 65535 because this was converted to fast sampling which rollsover at USHRT_MAX + 1 (65536). Similarly the burst durations would collect burst duration + 1 counts as they used an ULE comparison. 100% sampling: Although this is not useful for a productionized use case, it does allow for more deterministic testing with the sampling checks in place. After all the off by ones are fixed, allowing for 100% sampling is a matter of letting burst duration = period.
Diffstat (limited to 'clang/lib/CodeGen/CodeGenModule.cpp')
0 files changed, 0 insertions, 0 deletions