diff options
author | Matthias Braun <matze@braunis.de> | 2023-10-24 20:27:39 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-10-24 20:27:39 -0700 |
commit | e3cf80c5c1fe55efd8216575ccadea0ab087e79c (patch) | |
tree | 879bf301a8bd840d2ed60eb8216fb82f6a6d9eb4 /lldb/packages/Python/lldbsuite/test/configuration.py | |
parent | 69ade08b4a1ade66e61b3f9f095553a71e452873 (diff) | |
download | llvm-e3cf80c5c1fe55efd8216575ccadea0ab087e79c.zip llvm-e3cf80c5c1fe55efd8216575ccadea0ab087e79c.tar.gz llvm-e3cf80c5c1fe55efd8216575ccadea0ab087e79c.tar.bz2 |
BlockFrequencyInfoImpl: Avoid big numbers, increase precision for small spreads
BlockFrequencyInfo calculates block frequencies as Scaled64 numbers but as a last step converts them to unsigned 64bit integers (`BlockFrequency`). This improves the factors picked for this conversion so that:
* Avoid big numbers close to UINT64_MAX to avoid users overflowing/saturating when adding multiply frequencies together or when multiplying with integers. This leaves the topmost 10 bits unused to allow for some room.
* Spread the difference between hottest/coldest block as much as possible to increase precision.
* If the hot/cold spread cannot be represented loose precision at the lower end, but keep the frequencies at the upper end for hot blocks differentiable.
Diffstat (limited to 'lldb/packages/Python/lldbsuite/test/configuration.py')
0 files changed, 0 insertions, 0 deletions