mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
gh-118518: Allow perf to work without frame pointers (#112254)
This commit is contained in:
parent
999f0c5122
commit
1b22d801b8
19 changed files with 892 additions and 39 deletions
|
@ -2282,6 +2282,16 @@ sys_activate_stack_trampoline_impl(PyObject *module, const char *backend)
|
|||
return NULL;
|
||||
}
|
||||
}
|
||||
else if (strcmp(backend, "perfjit") == 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 {
|
||||
PyErr_Format(PyExc_ValueError, "invalid backend: %s", backend);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue