Commit Graph

10057 Commits

Author SHA1 Message Date
Diego Russo 685272eb8a JIT: Rename trampoline.c to shim.c (#142974) 2025-12-19 14:39:41 +00:00
Savannah Ostrowski 1391ee664c GH-134584: Remove redundant refcount for BINARY_OP_SUBSCR_STR_INT (#142844) 2025-12-18 21:29:54 +00:00
LloydZ 33d94abafd gh-134584: Eliminate redundant refcounting from _BINARY_OP_SUBSCR_LIST_INT (GH-142926) 2025-12-18 18:25:36 +00:00
Kumar Aditya e22c49522b gh-142890: remove unnecessary interp parameter from dict functions and _PyDict_NotifyEvent (#142923) 2025-12-18 22:48:56 +05:30
Mark Shannon e4058d7cb1 GH-142513: Reimplement executor management (GH-142931)
* Invalidating an executor does not cause arbitrary code to run
* Executors are only freed at safe points
2025-12-18 16:43:44 +00:00
Donghee Na 14f0b5191a gh-142419: Add mmap.set_name method for user custom annotation (gh-142480) 2025-12-18 23:33:49 +09:00
Donghee Na 71a7cb8887 gh-134584: Remove redundant refcount from _BINARY_OP_ADD_UNICODE (gh-142825) 2025-12-18 21:33:18 +09:00
Savannah Ostrowski 92243dc62c GH-100964: Fix reference cycle in exhausted generator frames (#141112) 2025-12-17 19:21:45 +00:00
Ken Jin fba4584ffc gh-142849: Fix segfault in executor_to_gv (GH-142885)
Fix segfault in `executor_to_gv`
2025-12-17 17:05:21 +00:00
sobolevn e61a447d0e gh-142873: Do not check for PyContextVar_CheckExact twice in PyContextVar_Set (#142874) 2025-12-17 19:41:36 +03:00
Mark Shannon c7dcb26520 GH-142621: JIT: Avoid memory load for symbols within 4GB on AArch64 (GH-142820) 2025-12-17 12:07:07 +00:00
Ken Jin 89729f2ef7 gh-142543: Mark tracer functions as Py_NO_INLINE (GH-142846) 2025-12-17 00:12:32 +00:00
Nadeshiko Manju 4345253981 gh-134584: Eliminate redundant refcounting from _STORE_ATTR_WITH_HINT (GH-142767)
Signed-off-by: Manjusaka <me@manjusaka.me>
2025-12-16 22:21:04 +00:00
Nadeshiko Manju 6ee51a36b3 gh-134584: Eliminate redundant refcounting from _LOAD_ATTR_INSTANCE_VALUE (GH-142769)
Signed-off-by: Manjusaka <me@manjusaka.me>
2025-12-16 20:39:20 +00:00
Mark Shannon 92d4aeafd5 GH-142629: JIT: Fix out of bounds memory read in lltrace (GH-142821)
JIT: Fix out of bounds memory read in lltrace
2025-12-16 19:57:15 +00:00
Gabriele N. Tornetta 16a305f152 Make RESUME monitoring more readable and robust (GH-142136) 2025-12-16 16:23:27 +00:00
Savannah Ostrowski bef63d2fb8 GH-134584: Remove redundant refcount from _STORE_ATTR_SLOT (#142729) 2025-12-15 15:18:44 -08:00
Bartosz Sławecki f277781bba gh-142737: Handle lost io.open in _Py_FindSourceFile (GH-142747) 2025-12-15 22:58:50 +00:00
Ken Jin 790a46a449 gh-134584: JIT: Eliminate redundant refcount ops for X_INT (GH-142765) 2025-12-15 22:22:18 +00:00
Nadeshiko Manju 059316ade6 gh-134584: Eliminate redundant refcounting from _STORE_ATTR_INSTANCE_VALUE (GH-142759)
Signed-off-by: Manjusaka <me@manjusaka.me>
2025-12-15 20:17:12 +00:00
Ken Jin 0ac4e6c6cd gh-134584: Remove custom float decref ops (GH-142576) 2025-12-15 19:38:58 +00:00
Mark Shannon 27a2e49d18 GH-142718: JIT: Fix crash due to incorrect caching on side exits when 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
2025-12-15 19:01:29 +00:00
Sam Gross a882ae198a gh-142472: Clean-up _PyStackRef functions (gh-142479)
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)
2025-12-15 12:03:49 -05:00
Donghee Na abaaeee6a0 gh-134584: Eliminate redundant refcounting from _STORE_SUBSCR_DICT (GH-142712)
Co-authored-by: Ken Jin <kenjin4096@gmail.com>
2025-12-15 16:42:32 +00:00
Nadeshiko Manju 872ab51f32 gh-134584: Eliminate redundant refcounting from _CALL_LIST_APPEND (GH-142711)
Signed-off-by: Manjusaka <me@manjusaka.me>
Co-authored-by: Ken Jin <kenjin4096@gmail.com>
2025-12-15 15:49:36 +00:00
dr-carlos cd2ca74c53 gh-142029: Raise ModuleNotFoundError instead of crashing on nonexsistent module name given to create_builtin() (#142054)
Co-authored-by: Brett Cannon <brett@python.org>
Co-authored-by: Victor Stinner <vstinner@python.org>
2025-12-15 13:20:19 +01:00
Kumar Aditya fb554ad68d gh-140414: streamline thread state access in asyncio (#142742) 2025-12-15 16:57:51 +05:30
Donghee Na 04da416e6b gh-134584: Eliminate redundant refcounting from _STORE_SUBSCR_LIST_INT (gh-142703) 2025-12-14 12:26:00 +00:00
PuQing a2a400af1e gh-134584: Eliminate redundant refcounting from _CALL_BUILTION_O (GH-142695)
Co-authored-by: Ken Jin <kenjin4096@gmail.com>
2025-12-14 10:28:02 +00:00
Yongtao Huang e90e6d155a gh-142666: Remove unused variable package in import logic (GH-142667)
The variable was previously used, but became unused after 133138a284.

Signed-off-by: Yongtao Huang <yongtaoh2022@gmail.com>
2025-12-14 11:39:45 +02:00
Nadeshiko Manju a154c9ed4e gh-134584: Eliminate redundant refcounting from _CALL_STR_1 (GH-136070)
Signed-off-by: Manjusaka <me@manjusaka.me>
2025-12-14 09:33:05 +00:00
Ken Jin e02a35c365 gh-134584: Cleanups for GH-135860 (GH-142604) 2025-12-13 14:38:10 +00:00
Petr Viktorin 15313dd3d7 gh-140550: Correct error message for PyModExport (PEP 793) hook (GH-142583) 2025-12-12 17:48:43 +01:00
Ken Jin a3a611b042 gh-134584: Revert partially GH-135860 (GH-142620) 2025-12-12 14:04:11 +00:00
Victor Stinner e0bca091a4 gh-142627: Ignore anonymous mappings in Linux remote debugging (#142628) 2025-12-12 13:12:11 +00:00
wangjingcun 2a820e2b9c fix typos in crossinterp.c and qsbr.c (#142612) 2025-12-12 11:48:20 +05:30
AZero13 9fe6e3ed36 gh-142571: Check for errors before calling each syscall in PyUnstable_CopyPerfMapFile() (#142460)
Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
Co-authored-by: Victor Stinner <vstinner@python.org>
Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
2025-12-11 21:18:52 +00:00
Neil Schemenauer e38967ed60 gh-142531: Fix free-threaded GC performance regression (gh-142562)
If there are many untracked tuples, the GC will run too often, resulting
in poor performance.  The fix is to include untracked tuples in the
"long lived" object count. The number of frozen objects is also now
included since the free-threaded GC must scan those too.
2025-12-11 12:30:56 -08:00
Brett Cannon af185727b2 GH-65961: Stop setting __cached__ on modules (GH-142165) 2025-12-11 11:44:46 -08:00
Donghee Na a27538540e gh-134584: Eliminate redundant refcounting from `_CALL_LEN` (gh-136104) 2025-12-11 15:24:34 +00:00
Noam Cohen a78f43b001 gh-134584: Eliminate redundant refcounting from _CALL_TUPLE_1 (GH-135860) 2025-12-11 14:31:28 +00:00
Mark Shannon 4eab90f4f3 GH-140683: JIT: Improve machine code for loading smaller constants on AArch64. (GH-142511)
* Use movz and movk instructions for loading 16 and 32 bit operands and oparg.
* Loading of 64 bit operands is unchanged.
2025-12-11 12:33:39 +00:00
Mark Shannon 469f191a85 GH-135379: Top of stack caching for the JIT. (GH-135465)
Uses three registers to cache values at the top of the evaluation stack
This significantly reduces memory traffic for smaller, more common uops.
2025-12-11 10:32:52 +00:00
Ken Jin 97e19014dd gh-137007: Track executor before any possible deallocations (GH-137016) 2025-12-11 05:09:56 +08:00
Ken Jin ebf3427615 gh-141976: Protect against non-progressing specializations in tracing JIT (GH-141989) 2025-12-10 19:39:11 +00:00
Diego Russo 46295677a1 GH-142305: JIT: Deduplicating GOT symbols in the trace (#142316) 2025-12-10 16:04:04 +00:00
Kevin Wang 49b1fb43f6 gh-142048: Fix lost gc allocations count on thread cleanup (#142233) 2025-12-10 07:29:40 +00:00
dr-carlos 70671267c1 gh-142029: Raise ValueError instead of crashing on empty name given to create_builtin() (#142033)
Co-authored-by: Victor Stinner <vstinner@python.org>
2025-12-10 12:01:57 +05:30
Ken Jin 97f0a1f203 gh-142276: Watch attribute loads when promoting JIT constants (GH-142303)
Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
Co-authored-by: Savannah Ostrowski <savannah@python.org>
2025-12-08 18:03:15 +00:00
Mark Shannon e0451ceef8 GH-139757: JIT: Remove redundant branches to jumps in the assembly optimizer (GH-140800)
JIT: Remove redundant branches to jump in the assembly optimizer

* Refactor JIT assembly optimizer making instructions instances not just strings
* Remove redundant jumps and branches where legal to do so
* Modifies _BINARY_OP_SUBSCR_STR_INT to avoid excessive inlining depth
2025-12-08 17:57:11 +00:00