aboutsummaryrefslogtreecommitdiff
path: root/lldb/source/Commands/CommandObjectFrame.cpp
diff options
context:
space:
mode:
authorAmir Ayupov <aaupov@fb.com>2024-10-24 18:30:59 -0700
committerGitHub <noreply@github.com>2024-10-24 18:30:59 -0700
commit6ee5ff95abe6ba6dfc4ca3a07a27b796fbf3664e (patch)
tree5a10a41724cd40088ed94b7bf2d4ed69505d6b97 /lldb/source/Commands/CommandObjectFrame.cpp
parent08916cef7e7ae334a04769126c2fefc144f8a5a0 (diff)
downloadllvm-6ee5ff95abe6ba6dfc4ca3a07a27b796fbf3664e.zip
llvm-6ee5ff95abe6ba6dfc4ca3a07a27b796fbf3664e.tar.gz
llvm-6ee5ff95abe6ba6dfc4ca3a07a27b796fbf3664e.tar.bz2
[BOLT] Add profile density computation
Reuse the definition of profile density from llvm-profgen (#92144): - the density is computed in perf2bolt using raw samples (perf.data or pre-aggregated data), - function density is the ratio of dynamically executed function bytes to the static function size in bytes, - profile density: - functions are sorted by density in decreasing order, accumulating their respective sample counts, - profile density is the smallest density covering 99% of total sample count. In other words, BOLT binary profile density is the minimum amount of profile information per function (excluding functions in tail 1% sample count) which is sufficient to optimize the binary well. The density threshold of 60 was determined through experiments with large binaries by reducing the sample count and checking resulting profile density and performance. The threshold is conservative. perf2bolt would print the warning if the density is below the threshold and suggest to increase the sampling duration and/or frequency to reach a given density, e.g.: ``` BOLT-WARNING: BOLT is estimated to optimize better with 2.8x more samples. ``` Test Plan: updated pre-aggregated-perf.test Reviewers: maksfb, wlei-llvm, rafaelauler, ayermolo, dcci, WenleiHe Reviewed By: WenleiHe, wlei-llvm Pull Request: https://github.com/llvm/llvm-project/pull/101094
Diffstat (limited to 'lldb/source/Commands/CommandObjectFrame.cpp')
0 files changed, 0 insertions, 0 deletions