[PATCH] D124412: [BOLT] Report per-section hotness in bolt-heatmap.

Rahman Lavaee via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 25 15:59:32 PDT 2022


rahmanl created this revision.
rahmanl added reviewers: rafauler, Amir.
Herald added subscribers: ayermolo, mgrang.
Herald added a reviewer: maksfb.
Herald added a project: All.
rahmanl updated this revision to Diff 425044.
rahmanl added a comment.
rahmanl updated this revision to Diff 425047.
rahmanl edited the summary of this revision.
rahmanl published this revision for review.
Herald added subscribers: llvm-commits, yota9.
Herald added a project: LLVM.

Refactoring.


rahmanl added a comment.

WIP.


This patch adds a new feature to bolt heatmap to print the hotness of each section in terms of the percentage of samples within that section.

Sample output generated for the clang binary:

Section Name, Begin Address, End Address, Percentage Hotness
.text, 0x1a7b9b0, 0x20a2cc0, 1.4709
.init, 0x20a2cc0, 0x20a2ce1, 0.0001
.fini, 0x20a2ce4, 0x20a2cf2, 0.0000
.text.unlikely, 0x20a2d00, 0x431990c, 0.3061
.text.hot, 0x4319910, 0x4bc6927, 97.2197
.text.startup, 0x4bc6930, 0x4c10c89, 0.0058
.plt, 0x4c10c90, 0x4c12010, 0.9974


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D124412

Files:
  bolt/include/bolt/Core/BinaryContext.h
  bolt/include/bolt/Profile/Heatmap.h
  bolt/lib/Core/BinaryContext.cpp
  bolt/lib/Profile/DataAggregator.cpp
  bolt/lib/Profile/Heatmap.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D124412.425047.patch
Type: text/x-patch
Size: 6953 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220425/dbb3a02e/attachment.bin>


More information about the llvm-commits mailing list