Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork32.2k
gh-115999: Implement thread-local bytecode and enable specialization forBINARY_OP
#123926
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Merged
Uh oh!
There was an error while loading.Please reload this page.
Merged
Changes from1 commit
Commits
Show all changes
84 commits Select commitHold shift + click to select a range
776a1e1
Assign threads indices into bytecode copies
mpage2b40870
Replace most usage of PyCode_CODE
mpage344d7ad
Get bytecode copying working
mpagef203d00
Refactor remove_tools
mpage82b456a
Refactor remove_line_tools
mpageb021704
Instrument thread-local bytecode
mpageaea69c5
Use locks for instrumentation
mpage552277d
Add ifdef guards for each specialization family
mpage50a6089
Specialize BINARY_OP
mpage3f1d941
Limit the amount of memory consumed by bytecode copies
mpage7d2eb27
Make thread-local bytecode limits user configurable
mpaged5476b9
Fix a few data races when (de)instrumenting opcodes
mpagee3b367a
Make branch taken recording thread-safe
mpageb2375bf
Lock thread-local bytecode when specializing
mpage2707f8e
Load bytecode on RESUME_CHECK
mpage3fdcb28
Load tlbc on generator.throw()
mpage4a55ce5
Use tlbc instead of thread_local_bytecode
mpage8b3ff60
Use tlbc everywhere
mpage862afa1
Explicitly manage tlbc state
mpage0b4d952
Refactor API for fetching tlbc
mpage7795e99
Add unit tests
mpage693a4cc
Fix initconfig in default build
mpageb43531e
Fix instrumentation in default build
mpage9025f43
Synchronize bytecode modifications between specialization and instrum…
mpagec44c7d9
Add a high-level comment
mpagee2a6656
Fix unused variable warning in default build
mpagee6513d1
Fix test_config in free-threaded builds
mpagea18396f
Fix formatting
mpage81fe1a2
Remove comment
mpage837645e
Fix data race in _PyInstruction_GetLength
mpagef13e132
Fix tier2 optimizer
mpage942f628
Use __VA_ARGS__ for macros
mpage66cb24d
Update vcxproj files to include newly added files
mpagead12bd4
Mark unused params
mpage1bbbbbc
Keep tier2 and the JIT disabled in free-threaded builds
mpagee63e403
Only allow enabling/disabling tlbc
mpage8b97771
Update libpython for gdb
mpaged34adeb
Merge branch 'main' into gh-115999-thread-local-bytecode
mpage6d4fe73
Handle out of memory errors
mpagec2d8693
Merge branch 'main' into gh-115999-thread-local-bytecode
mpageb104782
Fix warnings on windows
mpagedeb5216
Fix another warning
mpage2f11cc7
Ugh actually fix it
mpage04f1ac3
Add high-level comment about index pools
mpageaa330b1
Merge branch 'main' into gh-115999-thread-local-bytecode
mpage7dfd1ca
Merge branch 'main' into gh-115999-thread-local-bytecode
mpage7c9da24
Exclude tlbc from refleak counts
mpagedd144d0
Merge branch 'main' into gh-115999-thread-local-bytecode
mpagead180d1
Regen files
mpage95d2264
Move `get_tlbc_blocks` into the sys module
mpageb6380de
Merge branch 'main' into gh-115999-thread-local-bytecode
mpageadb59ef
Merge branch 'main' into gh-115999-thread-local-bytecode
mpage39c947d
Merge branch 'main' into gh-115999-thread-local-bytecode
mpage2cc5830
Work around `this_instr` now being const
mpage96ec126
Make RESUME_CHECK cheaper
mpage5ecebd9
Pass tstate to _PyCode_GetTLBCFast
mpage815b2fe
Rename test_tlbc.py to test_thread_local_bytecode.py
mpagefb90d23
Remove per-family defines for specialization
mpage4e42414
Replace bytecode pointer with tlbc_index
mpage814e4ca
Add a test verifying that we clean up tlbc when the code object is de…
mpageba3930a
Merge branch 'main' into gh-115999-thread-local-bytecode
mpagecb8a774
Fix indentation
mpage0f8a55b
Clarify comment
mpage70ce0fe
Fix TSAN
mpagef512353
Add test for cleaning up tlbc in correct place, not old emacs buffer
mpage4be2b1f
Remove test_tlbc.py
mpage61c7aa9
Merge branch 'main' into gh-115999-thread-local-bytecode
mpageab6222c
Use int32_t instead of Py_ssize_t for tlbc indices
mpage6bbb220
Use _PyCode_CODE instead of PyFrame_GetBytecode in super_init_without…
mpage4580e3c
Update comment
mpageb992f44
Consolidate _PyCode_{Quicken,DisableSpecialization} into _PyCode_Init…
mpage4c040d3
Merge branch 'main' into gh-115999-thread-local-bytecode
mpage5b7658c
Fix incorrect types
mpagebec5bce
Add command-line tests for enabling TLBC
mpagec9054b7
Update libpython.py for tlbc_index
mpage1a48ab2
Avoid special casing in _PyEval_GetExecutableCode
mpageb16ae5f
Merge branch 'main' into gh-115999-thread-local-bytecode
mpage176b24e
Merge branch 'main' into gh-115999-thread-local-bytecode
mpagec107495
Clear TLBC when other caches are cleared
mpage07f9140
Remove _get_tlbc_blocks
mpage4cbe237
Merge branch 'main' into gh-115999-thread-local-bytecode
mpage38ff315
Rename _PyCode_InitCounters back to _PyCode_Quicken
mpage338f7e5
Merge branch 'main' into gh-115999-thread-local-bytecode
mpagebcd1bb2
Merge branch 'main' into gh-115999-thread-local-bytecode
mpageFile filter
Filter by extension
Conversations
Failed to load comments.
Loading
Uh oh!
There was an error while loading.Please reload this page.
Jump to
Jump to file
Failed to load files.
Loading
Uh oh!
There was an error while loading.Please reload this page.
Diff view
Diff view
Refactor remove_line_tools
- Loading branch information
Uh oh!
There was an error while loading.Please reload this page.
commit82b456a301e29f9daaf053694a0f1079f5962a5b
There are no files selected for viewing
29 changes: 15 additions & 14 deletionsPython/instrumentation.c
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.