You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Provide secondary entry points for `EntryDiscriminator` call info field
in YAML profile.
Increases BAT section size to:
- large binary: 39655300 bytes (1.03x the original),
- medium binary: 3834328 bytes (0.65x),
- small binary: 924 bytes (0.64x).
Depends on: #76911
Test Plan:
- Updated bolt-address-translation{,-yaml}.test
- Added openssl test: rafaelauler/bolt-tests#30
Reviewers: dcci, rafaelauler, maksfb, ayermolo
Reviewed By: rafaelauler
Pull Request: #86218
Copy file name to clipboardExpand all lines: bolt/docs/BAT.md
+36-25Lines changed: 36 additions & 25 deletions
Original file line number
Diff line number
Diff line change
@@ -42,21 +42,21 @@ and [BoltAddressTranslation.cpp](/bolt/lib/Profile/BoltAddressTranslation.cpp).
42
42
### Layout
43
43
The general layout is as follows:
44
44
```
45
-
Hot functions table header
46
-
|------------------|
47
-
| Function entry |
48
-
| |--------------| |
49
-
| | OutOff InOff | |
50
-
| |--------------| |
51
-
~~~~~~~~~~~~~~~~~~~~
45
+
Hot functions table
46
+
Cold functions table
52
47
53
-
Cold functions table header
48
+
Functions table:
54
49
|------------------|
55
50
| Function entry |
56
-
| |--------------| |
57
-
| | OutOff InOff | |
58
-
| |--------------| |
59
-
~~~~~~~~~~~~~~~~~~~~
51
+
| |
52
+
| Address |
53
+
| translation |
54
+
| table |
55
+
| |
56
+
| Secondary entry |
57
+
| points |
58
+
|------------------|
59
+
60
60
```
61
61
62
62
### Functions table
@@ -74,19 +74,20 @@ internal offsets, and between hot and cold fragments, to better spread deltas
74
74
and save space.
75
75
76
76
Hot indices are delta encoded, implicitly starting at zero.
77
-
| Entry | Encoding | Description |
78
-
| ------ | ------| ----------- |
79
-
|`Address`| Continuous, Delta, ULEB128 | Function address in the output binary |
80
-
|`HotIndex`| Delta, ULEB128 | Cold functions only: index of corresponding hot function in hot functions table |
81
-
|`FuncHash`| 8b | Hot functions only: function hash for input function |
82
-
|`NumBlocks`| ULEB128 | Hot functions only: number of basic blocks in the original function |
83
-
|`NumEntries`| ULEB128 | Number of address translation entries for a function |
84
-
|`EqualElems`| ULEB128 | Hot functions only: number of equal offsets in the beginning of a function |
85
-
|`BranchEntries`| Bitmask, `alignTo(EqualElems, 8)` bits | Hot functions only: if `EqualElems` is non-zero, bitmask denoting entries with `BRANCHENTRY` bit |
86
-
87
-
Function header is followed by `EqualElems` offsets (hot functions only) and
88
-
`NumEntries-EqualElems` (`NumEntries` for cold functions) pairs of offsets for
89
-
current function.
77
+
| Entry | Encoding | Description | Hot/Cold |
78
+
| ------ | ------| ----------- | ------ |
79
+
|`Address`| Continuous, Delta, ULEB128 | Function address in the output binary | Both |
80
+
|`HotIndex`| Delta, ULEB128 | Index of corresponding hot function in hot functions table | Cold |
81
+
|`FuncHash`| 8b | Function hash for input function | Hot |
82
+
|`NumBlocks`| ULEB128 | Number of basic blocks in the original function | Hot |
83
+
|`NumSecEntryPoints`| ULEB128 | Number of secondary entry points in the original function | Hot |
84
+
|`NumEntries`| ULEB128 | Number of address translation entries for a function | Both |
85
+
|`EqualElems`| ULEB128 | Number of equal offsets in the beginning of a function | Hot |
86
+
|`BranchEntries`| Bitmask, `alignTo(EqualElems, 8)` bits | If `EqualElems` is non-zero, bitmask denoting entries with `BRANCHENTRY` bit | Hot |
87
+
88
+
Function header is followed by *Address Translation Table* with `NumEntries`
89
+
total entries, and *Secondary Entry Points* table with `NumSecEntryPoints`
90
+
entries (hot functions only).
90
91
91
92
### Address translation table
92
93
Delta encoding means that only the difference with the previous corresponding
@@ -98,8 +99,18 @@ entry is encoded. Input offsets implicitly start at zero.
0 commit comments