Commit 6b1cf00
authored
[BOLT] Add support for Linux kernel static keys jump table (#86090)
Runtime code modification used by static keys is the most ubiquitous
self-modifying feature of the Linux kernel. The idea is to to eliminate
the condition check and associated conditional jump on a hot path if
that condition (based on a boolean value of a static key) does not
change often. Whenever they condition changes, the kernel runtime
modifies all code paths associated with that key flipping the code
between nop and (unconditional) jump.1 parent 2ab106c commit 6b1cf00
File tree
9 files changed
+547
-3
lines changed- bolt
- include/bolt/Core
- lib
- Core
- Passes
- Rewrite
- Target/X86
- test/X86
9 files changed
+547
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
73 | 73 | | |
74 | 74 | | |
75 | 75 | | |
| 76 | + | |
76 | 77 | | |
77 | 78 | | |
78 | 79 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1199 | 1199 | | |
1200 | 1200 | | |
1201 | 1201 | | |
| 1202 | + | |
| 1203 | + | |
| 1204 | + | |
| 1205 | + | |
| 1206 | + | |
| 1207 | + | |
| 1208 | + | |
| 1209 | + | |
| 1210 | + | |
| 1211 | + | |
1202 | 1212 | | |
1203 | 1213 | | |
1204 | 1214 | | |
| |||
1688 | 1698 | | |
1689 | 1699 | | |
1690 | 1700 | | |
| 1701 | + | |
| 1702 | + | |
| 1703 | + | |
| 1704 | + | |
| 1705 | + | |
| 1706 | + | |
| 1707 | + | |
1691 | 1708 | | |
1692 | 1709 | | |
1693 | 1710 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1939 | 1939 | | |
1940 | 1940 | | |
1941 | 1941 | | |
1942 | | - | |
| 1942 | + | |
| 1943 | + | |
| 1944 | + | |
| 1945 | + | |
| 1946 | + | |
| 1947 | + | |
| 1948 | + | |
1943 | 1949 | | |
1944 | 1950 | | |
1945 | 1951 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3350 | 3350 | | |
3351 | 3351 | | |
3352 | 3352 | | |
| 3353 | + | |
| 3354 | + | |
| 3355 | + | |
| 3356 | + | |
| 3357 | + | |
| 3358 | + | |
| 3359 | + | |
| 3360 | + | |
| 3361 | + | |
| 3362 | + | |
3353 | 3363 | | |
3354 | 3364 | | |
3355 | 3365 | | |
| |||
3358 | 3368 | | |
3359 | 3369 | | |
3360 | 3370 | | |
3361 | | - | |
| 3371 | + | |
| 3372 | + | |
| 3373 | + | |
| 3374 | + | |
| 3375 | + | |
3362 | 3376 | | |
| 3377 | + | |
3363 | 3378 | | |
3364 | 3379 | | |
3365 | 3380 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
303 | 303 | | |
304 | 304 | | |
305 | 305 | | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
306 | 328 | | |
307 | 329 | | |
308 | 330 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
107 | 107 | | |
108 | 108 | | |
109 | 109 | | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
110 | 116 | | |
111 | 117 | | |
112 | 118 | | |
| |||
570 | 576 | | |
571 | 577 | | |
572 | 578 | | |
573 | | - | |
| 579 | + | |
| 580 | + | |
| 581 | + | |
| 582 | + | |
574 | 583 | | |
| 584 | + | |
575 | 585 | | |
576 | 586 | | |
577 | 587 | | |
| |||
852 | 862 | | |
853 | 863 | | |
854 | 864 | | |
| 865 | + | |
| 866 | + | |
| 867 | + | |
| 868 | + | |
855 | 869 | | |
856 | 870 | | |
857 | 871 | | |
| |||
1012 | 1026 | | |
1013 | 1027 | | |
1014 | 1028 | | |
| 1029 | + | |
| 1030 | + | |
| 1031 | + | |
| 1032 | + | |
1015 | 1033 | | |
1016 | 1034 | | |
1017 | 1035 | | |
| |||
0 commit comments