@@ -12,7 +12,7 @@ information. This information enables mapping the profile back from optimized
12
12
binary onto the original binary.
13
13
14
14
# 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
16
16
needs to be passed along with the optimized binary containing BAT section to
17
17
` perf2bolt ` which reads BAT section and produces fdata profile for the original
18
18
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
30
30
address translation information provided by BOLT linker. It is then encoded as a
31
31
note section in the output binary.
32
32
33
- During profile conversion when BAT-enabled binary is passed to perf2bolt,
33
+ During profile conversion when BAT-enabled binary is passed to perf2bolt,
34
34
` BoltAddressTranslation ` class is populated from BAT section. The class is then
35
35
queried by ` DataAggregator ` during sample processing to reconstruct addresses/
36
36
offsets in the input binary.
37
37
38
38
## 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 ) .
41
42
42
43
### Layout
43
44
The general layout is as follows:
@@ -79,6 +80,7 @@ Hot indices are delta encoded, implicitly starting at zero.
79
80
| ` Address ` | Continuous, Delta, ULEB128 | Function address in the output binary |
80
81
| ` HotIndex ` | Delta, ULEB128 | Cold functions only: index of corresponding hot function in hot functions table |
81
82
| ` NumEntries ` | ULEB128 | Number of address translation entries for a function |
83
+
82
84
Function header is followed by ` NumEntries ` pairs of offsets for current
83
85
function.
84
86
0 commit comments