mirror of
https://github.com/python/cpython.git
synced 2025-12-08 06:10:17 +00:00
gh-141579: Fix perf_jit backend in sys.activate_stack_trampoline() (#141580)
This commit is contained in:
parent
53d65c840e
commit
4ceb077c5c
3 changed files with 28 additions and 8 deletions
|
|
@ -238,6 +238,24 @@ def test_sys_api_get_status(self):
|
|||
"""
|
||||
assert_python_ok("-c", code, PYTHON_JIT="0")
|
||||
|
||||
def test_sys_api_perf_jit_backend(self):
|
||||
code = """if 1:
|
||||
import sys
|
||||
sys.activate_stack_trampoline("perf_jit")
|
||||
assert sys.is_stack_trampoline_active() is True
|
||||
sys.deactivate_stack_trampoline()
|
||||
assert sys.is_stack_trampoline_active() is False
|
||||
"""
|
||||
assert_python_ok("-c", code, PYTHON_JIT="0")
|
||||
|
||||
def test_sys_api_with_existing_perf_jit_trampoline(self):
|
||||
code = """if 1:
|
||||
import sys
|
||||
sys.activate_stack_trampoline("perf_jit")
|
||||
sys.activate_stack_trampoline("perf_jit")
|
||||
"""
|
||||
assert_python_ok("-c", code, PYTHON_JIT="0")
|
||||
|
||||
|
||||
def is_unwinding_reliable_with_frame_pointers():
|
||||
cflags = sysconfig.get_config_var("PY_CORE_CFLAGS")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue