| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(#114564)
* gh-112529: Remove PyGC_Head from object pre-header in free-threaded build
This avoids allocating space for PyGC_Head in the free-threaded build.
The GC implementation for free-threaded CPython does not use the
PyGC_Head structure.
* The trashcan mechanism uses the `ob_tid` field instead of `_gc_prev`
in the free-threaded build.
* The GDB libpython.py file now determines the offset of the managed
dict field based on whether the running process is a free-threaded
build. Those are identified by the `ob_ref_local` field in PyObject.
* Fixes `_PySys_GetSizeOf()` which incorrectly incorrectly included the
size of `PyGC_Head` in the size of static `PyTypeObject`.
|
| |
|
|
|
|
|
|
| |
frame->frame_obj was set to NULL a few lines earlier.
Signed-off-by: Anders Kaseorg <andersk@mit.edu>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The free-threaded build's GC implementation is non-generational, but was
scheduled as if it were collecting a young generation leading to
quadratic behavior. This increases the minimum threshold and scales it
to the number of live objects as we do for the old generation in the
default build.
Note that the scheduling is still not thread-safe without the GIL. Those
changes will come in later PRs.
A few tests, like "test_sneaky_frame_object" rely on prompt scheduling
of the GC. For now, to keep that test passing, we disable the scaled
threshold after calls like `gc.set_threshold(1, 0, 0)`.
|
|
|
|
|
|
|
| |
available (#112616)
Add a configure define for HAVE_PTHREAD_COND_TIMEDWAIT_RELATIVE_NP and
replaces pthread_cond_timedwait() with pthread_cond_timedwait_relative_np()
for relative time when supported in semaphore waiting logic.
|
|
|
|
| |
The current_fast_get() static inline function doesn't use its
'runtime' parameter, so just remove it.
|
| |
|
| |
|
|
|
|
|
|
|
| |
Add an option (--enable-experimental-jit for configure-based builds
or --experimental-jit for PCbuild-based ones) to build an
*experimental* just-in-time compiler, based on copy-and-patch (https://fredrikbk.com/publications/copy-and-patch.pdf).
See Tools/jit/README.md for more information on how to install the required build-time tooling.
|
|
|
|
|
|
|
|
|
| |
For interpreters that share state with the main interpreter, this points
to the same static memory structure. For interpreters with their own
obmalloc state, it is heap allocated. Add free_obmalloc_arenas() which
will free the obmalloc arenas and radix tree structures for interpreters
with their own obmalloc state.
Co-authored-by: Eric Snow <ericsnowcurrently@gmail.com>
|
| |
|
|
|
|
| |
optimisations (#114530)
|
|
|
|
|
|
|
| |
* gh-112529: Implement GC for free-threaded builds
This implements a mark and sweep GC for the free-threaded builds of
CPython. The implementation relies on mimalloc to find GC tracked
objects (i.e., "containers").
|
|
|
|
| |
numbers anymore (#114535)
|
| |
|
| |
|
|
|
|
| |
* Compiler emits END_FOR; POP_TOP instead of END_FOR. To support tier 2 side exits in loops.
|
|
|
|
|
| |
* Convert _LOAD_CONST to inline versions
* Remove PEP 523 checks
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The `--disable-gil` builds occasionally need to pause all but one thread. Some
examples include:
* Cyclic garbage collection, where this is often called a "stop the world event"
* Before calling `fork()`, to ensure a consistent state for internal data structures
* During interpreter shutdown, to ensure that daemon threads aren't accessing Python objects
This adds the following functions to implement global and per-interpreter pauses:
* `_PyEval_StopTheWorldAll()` and `_PyEval_StartTheWorldAll()` (for the global runtime)
* `_PyEval_StopTheWorld()` and `_PyEval_StartTheWorld()` (per-interpreter)
(The function names may change.)
These functions are no-ops outside of the `--disable-gil` build.
|
|
|
|
| |
before optimize_basic_block. (#114408)
|
| |
|
|
|
|
| |
implementation (#114385)
|
|
|
|
|
|
|
|
|
|
| |
* gh-112529: Use GC heaps for GC allocations in free-threaded builds
The free-threaded build's garbage collector implementation will need to
find GC objects by traversing mimalloc heaps. This hooks up the
allocation calls with the correct heaps by using a thread-local
"current_obj_heap" variable.
* Refactor out setting heap based on type
|
|
|
|
| |
guarantee_lineno_for_exits (#114267)
|
| |
|
| |
|
|
|
| |
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
|
| |
|
|
|
|
|
| |
Passing allow_code=False prevents serialization and de-serialization of
code objects which is incompatible between Python versions.
|
| |
|
| |
|
|
|
|
| |
not themselves. (GH-114078)
|
|
|
|
| |
Co-authored-by: Jules <57632293+JuliaPoo@users.noreply.github.com>
Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
|
|
|
|
| |
multiple predecessors (#113950)
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
check (#113943)
|
| |
|
| |
|
|
|
|
| |
counter executor to use uops. (GH-113864)
|
| |
|
|
|
| |
Fix a few places where the lltrace debug output printed ``(null)`` instead of an opcode name, because it was calling ``_PyUOpName()`` on a Tier-1 opcode.
|
|
|
|
| |
(GH-113843)
|
|
|
|
| |
to use the traceback module (#113712)
|
|
|
|
| |
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
|
|
|
|
|
|
|
|
| |
It can be used to set the location of a .python_history file
---------
Co-authored-by: Levi Sabah <0xl3vi@gmail.com>
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
|
|
|
|
| |
eval breaker (#113721)
|