Skip to content

Commit 01d801e

Browse files
committed
[𝘀𝗽𝗿] changes introduced through rebase
Created using spr 1.3.4 [skip ci]
1 parent d19c017 commit 01d801e

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

bolt/docs/BAT.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ information. This information enables mapping the profile back from optimized
1212
binary onto the original binary.
1313

1414
# Usage
15-
`--enable-bat` flag controls the generation of BAT section. Sampled profile
15+
`--enable-bat` flag controls the generation of BAT section. Sampled profile
1616
needs to be passed along with the optimized binary containing BAT section to
1717
`perf2bolt` which reads BAT section and produces fdata profile for the original
1818
binary. Note that YAML profile generation is not supported since BAT doesn't
@@ -30,14 +30,15 @@ BAT section is created from `BoltAddressTranslation` class which captures
3030
address translation information provided by BOLT linker. It is then encoded as a
3131
note section in the output binary.
3232

33-
During profile conversion when BAT-enabled binary is passed to perf2bolt,
33+
During profile conversion when BAT-enabled binary is passed to perf2bolt,
3434
`BoltAddressTranslation` class is populated from BAT section. The class is then
3535
queried by `DataAggregator` during sample processing to reconstruct addresses/
3636
offsets in the input binary.
3737

3838
## Encoding format
39-
The encoding is specified in bolt/include/bolt/Profile/BoltAddressTranslation.h
40-
and bolt/lib/Profile/BoltAddressTranslation.cpp.
39+
The encoding is specified in
40+
[BoltAddressTranslation.h](/bolt/include/bolt/Profile/BoltAddressTranslation.h)
41+
and [BoltAddressTranslation.cpp](/bolt/lib/Profile/BoltAddressTranslation.cpp).
4142

4243
### Layout
4344
The general layout is as follows:
@@ -79,6 +80,7 @@ Hot indices are delta encoded, implicitly starting at zero.
7980
| `Address` | Continuous, Delta, ULEB128 | Function address in the output binary |
8081
| `HotIndex` | Delta, ULEB128 | Cold functions only: index of corresponding hot function in hot functions table |
8182
| `NumEntries` | ULEB128 | Number of address translation entries for a function |
83+
8284
Function header is followed by `NumEntries` pairs of offsets for current
8385
function.
8486

0 commit comments

Comments
 (0)