Skip to content

Commit 827aa7e

Browse files
authored
Merge branch 'main' into gh-139269
2 parents cf3c01b + c4f21d7 commit 827aa7e

File tree

12 files changed

+332
-326
lines changed

12 files changed

+332
-326
lines changed

.github/workflows/jit.yml

Lines changed: 28 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,34 @@ jobs:
134134
make all --jobs 4
135135
./python -m test --multiprocess 0 --timeout 4500 --verbose2 --verbose3
136136
137+
jit-with-disabled-gil:
138+
name: Free-Threaded (Debug)
139+
needs: interpreter
140+
runs-on: ubuntu-24.04
141+
timeout-minutes: 90
142+
strategy:
143+
fail-fast: false
144+
matrix:
145+
llvm:
146+
- 19
147+
steps:
148+
- uses: actions/checkout@v4
149+
with:
150+
persist-credentials: false
151+
- uses: actions/setup-python@v5
152+
with:
153+
python-version: '3.11'
154+
- name: Build with JIT enabled and GIL disabled
155+
run: |
156+
sudo bash -c "$(wget -O - https://apt.llvm.org/llvm.sh)" ./llvm.sh ${{ matrix.llvm }}
157+
export PATH="$(llvm-config-${{ matrix.llvm }} --bindir):$PATH"
158+
./configure --enable-experimental-jit --with-pydebug --disable-gil
159+
make all --jobs 4
160+
- name: Run tests
161+
run: |
162+
./python -m test --multiprocess 0 --timeout 4500 --verbose2 --verbose3
163+
continue-on-error: true
164+
137165
no-opt-jit:
138166
name: JIT without optimizations (Debug)
139167
needs: interpreter
@@ -160,31 +188,3 @@ jobs:
160188
- name: Run tests without optimizations
161189
run: |
162190
PYTHON_UOPS_OPTIMIZE=0 ./python -m test --multiprocess 0 --timeout 4500 --verbose2 --verbose3
163-
164-
# XXX: GH-133171
165-
# jit-with-disabled-gil:
166-
# name: Free-Threaded (Debug)
167-
# needs: interpreter
168-
# runs-on: ubuntu-24.04
169-
# timeout-minutes: 90
170-
# strategy:
171-
# fail-fast: false
172-
# matrix:
173-
# llvm:
174-
# - 19
175-
# steps:
176-
# - uses: actions/checkout@v4
177-
# with:
178-
# persist-credentials: false
179-
# - uses: actions/setup-python@v5
180-
# with:
181-
# python-version: '3.11'
182-
# - name: Build with JIT enabled and GIL disabled
183-
# run: |
184-
# sudo bash -c "$(wget -O - https://apt.llvm.org/llvm.sh)" ./llvm.sh ${{ matrix.llvm }}
185-
# export PATH="$(llvm-config-${{ matrix.llvm }} --bindir):$PATH"
186-
# ./configure --enable-experimental-jit --with-pydebug --disable-gil
187-
# make all --jobs 4
188-
# - name: Run tests
189-
# run: |
190-
# ./python -m test --multiprocess 0 --timeout 4500 --verbose2 --verbose3

Include/internal/pycore_stackref.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -464,6 +464,12 @@ PyStackRef_CLOSE_SPECIALIZED(_PyStackRef ref, destructor destruct)
464464
PyStackRef_CLOSE(ref);
465465
}
466466

467+
static inline int
468+
PyStackRef_RefcountOnObject(_PyStackRef ref)
469+
{
470+
return (ref.bits & Py_TAG_REFCNT) == 0;
471+
}
472+
467473
static inline _PyStackRef
468474
PyStackRef_DUP(_PyStackRef stackref)
469475
{

0 commit comments

Comments
 (0)