cpython/Tools
mpage 2e95c5ba3b
gh-115999: Implement thread-local bytecode and enable specialization for `BINARY_OP` (#123926)
Each thread specializes a thread-local copy of the bytecode, created on the first RESUME, in free-threaded builds. All copies of the bytecode for a code object are stored in the co_tlbc array on the code object. Threads reserve a globally unique index identifying its copy of the bytecode in all co_tlbc arrays at thread creation and release the index at thread destruction. The first entry in every co_tlbc array always points to the "main" copy of the bytecode that is stored at the end of the code object. This ensures that no bytecode is copied for programs that do not use threads.

Thread-local bytecode can be disabled at runtime by providing either -X tlbc=0 or PYTHON_TLBC=0. Disabling thread-local bytecode also disables specialization.

Concurrent modifications to the bytecode made by the specializing interpreter and instrumentation use atomics, with specialization taking care not to overwrite an instruction that was instrumented concurrently.
2024-11-04 11:13:32 -08:00
..
build gh-89640: properly detect float word ordering on Linux (#125571) 2024-10-26 15:46:46 +00:00
buildbot gh-115556: Remove quotes from command-line arguments in test.bat and rt.bat (#115557) 2024-02-16 21:24:56 +01:00
c-analyzer gh-99108: Cleanup references to inexisting `Modules/_blake2`. (GH-126270) 2024-11-01 16:18:44 +00:00
cases_generator gh-126211: Exclude preprocessor directives from statements containing escaping calls (#126213) 2024-11-01 08:53:03 -07:00
clinic gh-90370: Argument Clinic: avoid temporary tuple creation for varargs (#126064) 2024-10-31 11:37:03 +01:00
freeze gh-65701: document that freeze doesn't work with framework builds on macOS (#113352) 2023-12-21 16:28:00 +01:00
ftscalingbench gh-125985: Add free threading scaling micro benchmarks (#125986) 2024-10-28 17:47:23 -04:00
gdb gh-115999: Implement thread-local bytecode and enable specialization for `BINARY_OP` (#123926) 2024-11-04 11:13:32 -08:00
i18n gh-102507 Remove invisible pagebreak characters (#102531) 2023-03-08 13:58:14 +00:00
importbench gh-58032: Do not use argparse.FileType in module CLIs and scripts (GH-113649) 2024-01-10 15:07:19 +02:00
jit GH-125498: Update JIT builds to use LLVM 19 and preserve_none (GH-125499) 2024-10-30 12:03:31 -07:00
lockbench gh-108724: Add PyMutex and _PyParkingLot APIs (gh-109344) 2023-09-19 09:54:29 -06:00
msi gh-124102: Clean up unsupported VS and WiX detections (GH-124784) 2024-10-18 13:48:18 +01:00
nuget
patchcheck GH-109408: Stop running patchcheck in CI (#109895) 2024-08-03 12:52:21 +01:00
peg_generator gh-125588: Teach the python PEG generator the new f-string tokens (#125589) 2024-10-29 23:40:12 +00:00
scripts GH-124284: Add stats for refcount operations on immortal objects (GH-124288) 2024-09-23 19:10:55 +01:00
ssl gh-123700: Update OpenSSL versions in multissltests and CI (#123701) 2024-09-04 14:29:41 -05:00
tsan gh-117657: Fix file descriptor race in test_socket.py (#123697) 2024-09-06 15:00:28 -04:00
tz
unicode closes gh-124016: update Unicode to 16.0.0 (#124017) 2024-09-13 07:47:04 -07:00
unittestgui
wasm gh-124928: Emscripten node support: Clean up old node <= 16 flags (#124929) 2024-10-29 06:28:54 +00:00
README gh-100176: Remove outdated Tools/{io,cc,string}bench (#101853) 2024-02-17 14:17:21 -07:00
requirements-dev.txt gh-109413: Add more type hints to `libregrtest` (#126352) 2024-11-04 13:15:57 +03:00
requirements-hypothesis.txt build(deps): bump hypothesis from 6.108.10 to 6.111.2 in /Tools (#123567) 2024-09-02 08:04:50 +03:00

README

This directory contains a number of Python programs that are useful
while building or extending Python.

build           Automatically generated directory by the build system
                contain build artifacts and intermediate files.

buildbot        Batchfiles for running on Windows buildbot workers.

c-analyzer      Tools to check no new global variables have been added.

cases_generator Tooling to generate interpreters.

clinic          A preprocessor for CPython C files in order to automate
                the boilerplate involved with writing argument parsing
                code for "builtins".

freeze          Create a stand-alone executable from a Python program.

gdb             Python code to be run inside gdb, to make it easier to
                debug Python itself (by David Malcolm).

i18n            Tools for internationalization. pygettext.py
                parses Python source code and generates .pot files,
                and msgfmt.py generates a binary message catalog
                from a catalog in text format.

importbench     A set of micro-benchmarks for various import scenarios.

msi             Support for packaging Python as an MSI package on Windows.

nuget           Files for the NuGet package manager for .NET.

patchcheck      Tools for checking and applying patches to the Python source code
                and verifying the integrity of patch files.

peg_generator   PEG-based parser generator (pegen) used for new parser.

scripts         A number of useful single-file programs, e.g. run_tests.py
                which runs the Python test suite.

ssl             Scripts to generate ssl_data.h from OpenSSL sources, and run
                tests against multiple installations of OpenSSL and LibreSSL.

tz              A script to dump timezone from /usr/share/zoneinfo.

unicode         Tools for generating unicodedata and codecs from unicode.org
                and other mapping files (by Fredrik Lundh, Marc-Andre Lemburg
                and Martin von Loewis).

unittestgui     A Tkinter based GUI test runner for unittest, with test
                discovery.

wasm            Config and helpers to facilitate cross compilation of CPython
                to WebAssembly (WASM).

Note: The pynche color editor has moved to https://gitlab.com/warsaw/pynche