mirror of
https://github.com/python/cpython.git
synced 2025-12-23 09:19:18 +00:00
gh-141579: Fix perf_jit backend in sys.activate_stack_trampoline() (#141580)
Some checks failed
Lint / lint (push) Has been cancelled
Tests / Change detection (push) Has been cancelled
mypy / Run mypy on Lib/_pyrepl (push) Has been cancelled
mypy / Run mypy on Lib/test/libregrtest (push) Has been cancelled
mypy / Run mypy on Lib/tomllib (push) Has been cancelled
mypy / Run mypy on Tools/build (push) Has been cancelled
mypy / Run mypy on Tools/cases_generator (push) Has been cancelled
mypy / Run mypy on Tools/clinic (push) Has been cancelled
mypy / Run mypy on Tools/jit (push) Has been cancelled
mypy / Run mypy on Tools/peg_generator (push) Has been cancelled
Tests / (push) Has been cancelled
Tests / Windows MSI (push) Has been cancelled
Tests / Docs (push) Has been cancelled
Tests / Check if Autoconf files are up to date (push) Has been cancelled
Tests / Check if generated files are up to date (push) Has been cancelled
Tests / Ubuntu SSL tests with OpenSSL (push) Has been cancelled
Tests / Ubuntu SSL tests with AWS-LC (push) Has been cancelled
Tests / Android (aarch64) (push) Has been cancelled
Tests / Android (x86_64) (push) Has been cancelled
Tests / iOS (push) Has been cancelled
Tests / WASI (push) Has been cancelled
Tests / Hypothesis tests on Ubuntu (push) Has been cancelled
Tests / Address sanitizer (push) Has been cancelled
Tests / Sanitizers (push) Has been cancelled
Tests / Cross build Linux (push) Has been cancelled
Tests / CIFuzz (push) Has been cancelled
Tests / All required checks pass (push) Has been cancelled
Some checks failed
Lint / lint (push) Has been cancelled
Tests / Change detection (push) Has been cancelled
mypy / Run mypy on Lib/_pyrepl (push) Has been cancelled
mypy / Run mypy on Lib/test/libregrtest (push) Has been cancelled
mypy / Run mypy on Lib/tomllib (push) Has been cancelled
mypy / Run mypy on Tools/build (push) Has been cancelled
mypy / Run mypy on Tools/cases_generator (push) Has been cancelled
mypy / Run mypy on Tools/clinic (push) Has been cancelled
mypy / Run mypy on Tools/jit (push) Has been cancelled
mypy / Run mypy on Tools/peg_generator (push) Has been cancelled
Tests / (push) Has been cancelled
Tests / Windows MSI (push) Has been cancelled
Tests / Docs (push) Has been cancelled
Tests / Check if Autoconf files are up to date (push) Has been cancelled
Tests / Check if generated files are up to date (push) Has been cancelled
Tests / Ubuntu SSL tests with OpenSSL (push) Has been cancelled
Tests / Ubuntu SSL tests with AWS-LC (push) Has been cancelled
Tests / Android (aarch64) (push) Has been cancelled
Tests / Android (x86_64) (push) Has been cancelled
Tests / iOS (push) Has been cancelled
Tests / WASI (push) Has been cancelled
Tests / Hypothesis tests on Ubuntu (push) Has been cancelled
Tests / Address sanitizer (push) Has been cancelled
Tests / Sanitizers (push) Has been cancelled
Tests / Cross build Linux (push) Has been cancelled
Tests / CIFuzz (push) Has been cancelled
Tests / All required checks pass (push) Has been cancelled
This commit is contained in:
parent
53d65c840e
commit
4ceb077c5c
3 changed files with 28 additions and 8 deletions
|
|
@ -2380,14 +2380,14 @@ sys_activate_stack_trampoline_impl(PyObject *module, const char *backend)
|
|||
return NULL;
|
||||
}
|
||||
}
|
||||
else if (strcmp(backend, "perf_jit") == 0) {
|
||||
_PyPerf_Callbacks cur_cb;
|
||||
_PyPerfTrampoline_GetCallbacks(&cur_cb);
|
||||
if (cur_cb.write_state != _Py_perfmap_jit_callbacks.write_state) {
|
||||
if (_PyPerfTrampoline_SetCallbacks(&_Py_perfmap_jit_callbacks) < 0 ) {
|
||||
PyErr_SetString(PyExc_ValueError, "can't activate perf jit trampoline");
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
else if (strcmp(backend, "perf_jit") == 0) {
|
||||
_PyPerf_Callbacks cur_cb;
|
||||
_PyPerfTrampoline_GetCallbacks(&cur_cb);
|
||||
if (cur_cb.write_state != _Py_perfmap_jit_callbacks.write_state) {
|
||||
if (_PyPerfTrampoline_SetCallbacks(&_Py_perfmap_jit_callbacks) < 0 ) {
|
||||
PyErr_SetString(PyExc_ValueError, "can't activate perf jit trampoline");
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue