summaryrefslogtreecommitdiffstats
path: root/Include
Commit message (Collapse)AuthorAgeFilesLines
* Python 3.15.0a3v3.15.0a3Hugo van Kemenade13 days1-2/+2
|
* GH-134584: Remove redundant refcount from `_STORE_ATTR_SLOT` (#142729)Savannah Ostrowski13 days3-5/+5
|
* gh-134584: JIT: Eliminate redundant refcount ops for X_INT (GH-142765)Ken Jin13 days3-782/+773
|
* gh-134584: Eliminate redundant refcounting from `_STORE_ATTR_INSTANCE_VALUE` ↵Nadeshiko Manju13 days3-5/+5
| | | | | (GH-142759) Signed-off-by: Manjusaka <me@manjusaka.me>
* gh-134584: Remove custom float decref ops (GH-142576)Ken Jin13 days4-1122/+1033
|
* GH-142718: JIT: Fix crash due to incorrect caching on side exits when ↵Mark Shannon14 days2-283/+295
| | | | | | | | exiting jitted code. (GH-142762) JIT: Fix crash due to incorrect caching on side exits when exiting jitted code. * Make sure that stack is in correct state at side exits with TOS cached values * Simplify choice of cached items for side exits
* gh-142472: Clean-up _PyStackRef functions (gh-142479)Sam Gross14 days2-195/+53
| | | | | | | | This combines most _PyStackRef functions and macros between the free threaded and default builds. - Remove Py_TAG_DEFERRED (same as Py_TAG_REFCNT) - Remove PyStackRef_IsDeferred (same as !PyStackRef_RefcountOnObject)
* gh-134584: Eliminate redundant refcounting from _STORE_SUBSCR_DICT (GH-142712)Donghee Na14 days3-5/+5
| | | Co-authored-by: Ken Jin <kenjin4096@gmail.com>
* gh-134584: Eliminate redundant refcounting from _CALL_LIST_APPEND (GH-142711)Nadeshiko Manju14 days3-687/+696
| | | | Signed-off-by: Manjusaka <me@manjusaka.me> Co-authored-by: Ken Jin <kenjin4096@gmail.com>
* gh-138122: Add --subprocesses flag to profile child processes in tachyon ↵Pablo Galindo Salgado14 days4-0/+7
| | | | (#142636)
* gh-140414: streamline thread state access in `asyncio` (#142742)Kumar Aditya14 days1-0/+3
|
* gh-134584: Eliminate redundant refcounting from _STORE_SUBSCR_LIST_INT ↵Donghee Na2025-12-143-5/+5
| | | | (gh-142703)
* gh-134584: Eliminate redundant refcounting from `_CALL_BUILTION_O` (GH-142695)PuQing2025-12-143-7/+7
| | | Co-authored-by: Ken Jin <kenjin4096@gmail.com>
* gh-134584: Eliminate redundant refcounting from `_CALL_STR_1` (GH-136070)Nadeshiko Manju2025-12-143-7/+7
| | | Signed-off-by: Manjusaka <me@manjusaka.me>
* gh-134584: Cleanups for GH-135860 (GH-142604)Ken Jin2025-12-133-7/+7
|
* gh-132657: Add lock-free set contains implementation (#132290)Neil Schemenauer2025-12-131-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | This roughly follows what was done for dictobject to make a lock-free lookup operation. With this change, the set contains operation scales much better when used from multiple-threads. The frozenset contains performance seems unchanged (as already lock-free). Summary of changes: * refactor set_lookkey() into set_do_lookup() which now takes a function pointer that does the entry comparison. This is similar to dictobject and do_lookup(). In an optimized build, the comparison function is inlined and there should be no performance cost to this. * change set_do_lookup() to return a status separately from the entry value * add set_compare_frozenset() and use if the object is a frozenset. For the free-threaded build, this avoids some overhead (locking, atomic operations, incref/decref on key) * use FT_ATOMIC_* macros as needed for atomic loads and stores * use a deferred free on the set table array, if shared (only on free-threaded build, normal build always does an immediate free) * for free-threaded build, use explicit for loop to zero the table, rather than memcpy() * when mutating the set, assign so->table to NULL while the change is a happening. Assign the real table array after the change is done.
* gh-134584: Revert partially GH-135860 (GH-142620)Ken Jin2025-12-123-5/+5
|
* gh-142217: Deprecate the private _Py_Identifier C API (#142221)Victor Stinner2025-12-123-3/+3
| | | | | | | Deprecate functions: * _PyObject_CallMethodId() * _PyObject_GetAttrId() * _PyUnicode_FromId()
* gh-142534: Avoid TSan warnings in dictobject.c (gh-142544)Sam Gross2025-12-112-0/+14
| | | | | | There are places we use "relaxed" loads where C11 requires "consume" or stronger. Unfortunately, compilers don't really implement "consume" so fake it for our use in a way that avoids upsetting TSan.
* gh-138122: Add exception profiling mode to the sampling profiler (#142561)Pablo Galindo Salgado2025-12-111-0/+12
|
* gh-134584: Eliminate redundant refcounting from ``_CALL_LEN`` (gh-136104)Donghee Na2025-12-113-5/+5
|
* gh-134584: Eliminate redundant refcounting from `_CALL_TUPLE_1` (GH-135860)Noam Cohen2025-12-113-5/+5
|
* GH-135379: Top of stack caching for the JIT. (GH-135465)Mark Shannon2025-12-118-106/+5106
| | | | Uses three registers to cache values at the top of the evaluation stack This significantly reduces memory traffic for smaller, more common uops.
* gh-123241: Don't modify ref count during visitation (GH-142232)Dino Viehland2025-12-111-0/+5
|
* gh-138122: Make the tachyon profiler opcode-aware (#142394)Pablo Galindo Salgado2025-12-114-0/+7
|
* gh-141976: Protect against non-progressing specializations in tracing JIT ↵Ken Jin2025-12-101-0/+1
| | | | (GH-141989)
* gh-142447: Fix cast warning in pycore_backoff.h (#142465)Victor Stinner2025-12-091-1/+1
| | | | | MAKE_VALUE_AND_BACKOFF() macro casts its result to uint16_t. Add pycore_backoff.h header to test_cppext tests.
* gh-140222: Increase stack margin on debug build (#142452)Victor Stinner2025-12-091-3/+3
| | | Increase _PyOS_MIN_STACK_SIZE if Python is built in debug mode.
* gh-142342: Fix m68k assembler operand constraints for `%fpcr` access (gh-142343)John Paul Adrian Glaubitz2025-12-091-3/+3
| | | | | | | | | | | On m68k, an fmove instruction accessing %fpcr may only move from or to a data register or a memory operand. The constraint "g" also permits the use of address registers, which is invalid. The correct constraint is "dm". Beginning with GCC 15, the register allocator picks an address register in the code which causes SIGILL during runtime. Co-authored-by: Michael Karcher <github@mkarcher.dialup.fu-berlin.de>
* gh-124379: Document _PyStackRef (gh-142321)Sam Gross2025-12-081-7/+0
|
* gh-141770: Annotate anonymous mmap usage if "-X dev" is used (gh-142079)Donghee Na2025-12-081-0/+45
|
* gh-141732: Fix `ExceptionGroup` repr changing when original exception ↵dr-carlos2025-12-071-0/+1
| | | | sequence is mutated (#141736)
* gh-138122: Don't sample partial frame chains (#141912)Pablo Galindo Salgado2025-12-073-0/+14
|
* gh-138122: Implement frame caching in RemoteUnwinder to reduce memory reads ↵Pablo Galindo Salgado2025-12-066-0/+18
| | | | | | | | | | | (#142137) This PR implements frame caching in the RemoteUnwinder class to significantly reduce memory reads when profiling remote processes with deep call stacks. When cache_frames=True, the unwinder stores the frame chain from each sample and reuses unchanged portions in subsequent samples. Since most profiling samples capture similar call stacks (especially the parent frames), this optimization avoids repeatedly reading the same frame data from the target process. The implementation adds a last_profiled_frame field to the thread state that tracks where the previous sample stopped. On the next sample, if the current frame chain reaches this marker, the cached frames from that point onward are reused instead of being re-read from remote memory. The sampling profiler now enables frame caching by default.
* gh-141370: Fix undefined behavior when using Py_ABS() (GH-141548)Serhiy Storchaka2025-12-051-0/+6
| | | Co-authored-by: Sergey B Kirpichev <skirpichev@gmail.com>
* gh-142225: Fix `PyABIInfo_VAR` macro (GH-142230)Stan Ulbrych2025-12-041-1/+1
|
* GH-141794: Limit size of generated machine code. (GH-142228)Mark Shannon2025-12-033-0/+66
| | | | | | * Factor out bodies of the largest uops, to reduce jit code size. * Factor out common assert, also reducing jit code size. * Limit size of jitted code for a single executor to 1MB.
* gh-142217: Remove internal _Py_Identifier functions (#142219)Victor Stinner2025-12-034-50/+0
| | | | | | | | | | | | | | | | Remove internal functions: * _PyDict_ContainsId() * _PyDict_DelItemId() * _PyDict_GetItemIdWithError() * _PyDict_SetItemId() * _PyEval_GetBuiltinId() * _PyObject_CallMethodIdNoArgs() * _PyObject_CallMethodIdObjArgs() * _PyObject_CallMethodIdOneArg() * _PyObject_VectorcallMethodId() * _PyUnicode_EqualToASCIIId() These functions were not exported and so no usable outside CPython.
* gh-142163: Only define `HAVE_THREAD_LOCAL` when `Py_BUILD_CORE` is set (#142164)Peter Bierma2025-12-021-2/+8
|
* gh-130396: Export _Py_ReachedRecursionLimitWithMargin() (#142012)Victor Stinner2025-11-271-1/+2
| | | test_peg_generator needs the function.
* gh-116008: Detect freed thread state in faulthandler (#141988)Victor Stinner2025-11-271-0/+21
| | | Add _PyMem_IsULongFreed() function.
* gh-127635: Use flexible array in tracemalloc (#141991)Victor Stinner2025-11-271-8/+12
| | | Replace frames[1] with frames[] in tracemalloc_traceback structure.
* gh-130396: Remove _Py_ReachedRecursionLimitWithMargin() function (#141951)Victor Stinner2025-11-272-2/+4
| | | Move the private function to the internal C API (pycore_ceval.h).
* gh-116738: Fix thread-safety issue in re module for free threading (gh-141923)Alper2025-11-261-0/+6
| | | | | | | | Added atomic operations to `scanner_begin()` and `scanner_end()` to prevent race conditions on the `executing` flag in free-threaded builds. Also added tests for concurrent usage of the `re` module. Without the atomic operations, `test_scanner_concurrent_access()` triggers `assert(self->executing)` failures, or a thread sanitizer run emits errors.
* gh-139165: Make Py_SIZE, Py_IS_TYPE,Py_ SET_SIZE regular functions in stable ↵Petr Viktorin2025-11-251-41/+55
| | | | | | | | | | | | ABI (GH-139166) * Make Py_{SIZE,IS_TYPE,SET_SIZE} regular functions in stable ABI Group them together with Py_TYPE & Py_SET_TYPE to cut down on repetitive preprocessor macros. Format repetitive definitions in object.c more concisely. Py_SET_TYPE is still left out of the Limited API.
* gh-116749: Fix code comment for _PyConfig_GIL_DEFAULT (gh-141804)Sam Gross2025-11-241-4/+2
|
* gh-141780: Make PyModule_FromSlotsAndSpec enable GIL if needed (GH-141785)Petr Viktorin2025-11-241-2/+9
|
* GH-140638: Add a GC "candidates" stat (GH-141814)Brandt Bucher2025-11-221-0/+4
|
* gh-141498: Change backoff counter to use prime numbers instead of powers of ↵Mikhail Efimov2025-11-211-28/+40
| | | | 2 (GH-141591)
* gh-140795: fetch thread state once on fast path for critical sections (#141406)Kumar Aditya2025-11-211-27/+57
|