Skip to content

Commit 2bb511e

Browse files
authored
[BOLT][NFC] Print BAT section size (llvm#76897)
Test Plan: Updated bolt/test/X86/bolt-address-translation.test
1 parent c3e3aa9 commit 2bb511e

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

bolt/lib/Rewrite/RewriteInstance.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4112,6 +4112,7 @@ void RewriteInstance::encodeBATSection() {
41124112
copyByteArray(BoltInfo), BoltInfo.size(),
41134113
/*Alignment=*/1,
41144114
/*IsReadOnly=*/true, ELF::SHT_NOTE);
4115+
outs() << "BOLT-INFO: BAT section size (bytes): " << BoltInfo.size() << '\n';
41154116
}
41164117

41174118
template <typename ELFShdrTy>

bolt/test/X86/bolt-address-translation.test

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@
3737
# CHECK: BOLT: 3 out of 7 functions were overwritten.
3838
# CHECK: BOLT-INFO: Wrote 6 BAT maps
3939
# CHECK: BOLT-INFO: Wrote 3 BAT cold-to-hot entries
40+
# CHECK: BOLT-INFO: BAT section size (bytes): 1436
4041
#
4142
# usqrt mappings (hot part). We match against any key (left side containing
4243
# the bolted binary offsets) because BOLT may change where it puts instructions

0 commit comments

Comments
 (0)