Repository navigation
Commit 62ef422
committed
gh-162711: Only record branch history when tier 2 is enabled
In the free-threaded build the main thread's bytecode is stored inline
in the code object, so the store done by RECORD_BRANCH_TAKEN on every
conditional jump caused false sharing with other threads reading
co_tlbc and _co_instrumentation_version when calling the same function.
The branch history is only used by the tier 2 optimizer, so only record
it when _Py_TIER2 is defined.1 parent 49a344e commit 62ef422
2 files changed
Lines changed: 10 additions & 2 deletions
File tree
- Misc/NEWS.d/next/Core_and_Builtins
- Python
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
384 | 384 | | |
385 | 385 | | |
386 | 386 | | |
387 | | - | |
388 | | - | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
389 | 394 | | |
390 | 395 | | |
391 | 396 | | |
| |||
0 commit comments