[all-commits] [llvm/llvm-project] 7f4feb: [BOLT][heatmap] Compute section utilization and pa...
Amir Ayupov via All-commits
all-commits at lists.llvm.org
Tue May 13 13:20:34 PDT 2025
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 7f4febde1030b8bb409cc56a50e575ff08fcd6ae
https://github.com/llvm/llvm-project/commit/7f4febde1030b8bb409cc56a50e575ff08fcd6ae
Author: Amir Ayupov <aaupov at fb.com>
Date: 2025-05-13 (Tue, 13 May 2025)
Changed paths:
M bolt/lib/Profile/Heatmap.cpp
M bolt/lib/Rewrite/RewriteInstance.cpp
M bolt/test/X86/heatmap-preagg.test
Log Message:
-----------
[BOLT][heatmap] Compute section utilization and partition score (#139193)
Heatmap groups samples into buckets of configurable size (`--block-size`
flag with 64 bytes as the default =X86 cache line size). Buckets are
mapped to containing sections; for buckets that cover multiple sections,
they are attributed to the first overlapping section. Buckets not mapped
to a section are reported as unmapped.
Heatmap reports **section hotness** which is a percentage of samples
attributed to the section.
Define **section utilization** as a percentage of buckets with non-zero
samples relative to the total number of section buckets.
Also define section **partition score** as a product of section hotness
(where total excludes unmapped buckets) and mapped utilization, ranging
from 0 to 1 (higher is better).
The intended use of new metrics is with **production profile** collected
from BOLT-optimized binary. In this case the partition score of .text
(hot text if function splitting is enabled) reflects **optimization
profile** representativeness and the quality of hot-cold splitting.
Partition score of 1 means that all samples fall into hot text, and all
buckets (cache lines) in hot text are exercised, equivalent to perfect
hot-cold splitting.
Test Plan: updated heatmap-preagg.test
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list