Skip to content

Commit d4b5386

Browse files
committed
Update Python/sysmodule.c
Signed-off-by: Pablo Galindo <pablogsal@gmail.com>
1 parent aeac29c commit d4b5386

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

Doc/library/sys.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1727,6 +1727,8 @@ always available.
17271727
Activate the stack profiler trampoline *backend*.
17281728
The only supported backend is ``"perf"``.
17291729

1730+
Stack trampolines cannot be activated if the JIT is active.
1731+
17301732
.. availability:: Linux.
17311733

17321734
.. versionadded:: 3.12

Python/sysmodule.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2287,7 +2287,7 @@ sys_activate_stack_trampoline_impl(PyObject *module, const char *backend)
22872287
/*[clinic end generated code: output=5783cdeb51874b43 input=a12df928758a82b4]*/
22882288
{
22892289
#ifdef PY_HAVE_PERF_TRAMPOLINE
2290-
#ifdef _Py_TIER2
2290+
#ifdef _Py_JIT
22912291
_PyOptimizerObject* optimizer = _Py_GetOptimizer();
22922292
if (optimizer != NULL) {
22932293
PyErr_SetString(PyExc_ValueError, "Cannot activate the perf trampoline if the JIT is active");

0 commit comments

Comments
 (0)