mirror of
https://github.com/python/cpython.git
synced 2025-08-22 17:55:18 +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
|
@ -1210,7 +1210,14 @@ init_interp_main(PyThreadState *tstate)
|
|||
|
||||
#ifdef PY_HAVE_PERF_TRAMPOLINE
|
||||
if (config->perf_profiling) {
|
||||
if (_PyPerfTrampoline_SetCallbacks(&_Py_perfmap_callbacks) < 0 ||
|
||||
_PyPerf_Callbacks *cur_cb;
|
||||
if (config->perf_profiling == 1) {
|
||||
cur_cb = &_Py_perfmap_callbacks;
|
||||
}
|
||||
else {
|
||||
cur_cb = &_Py_perfmap_jit_callbacks;
|
||||
}
|
||||
if (_PyPerfTrampoline_SetCallbacks(cur_cb) < 0 ||
|
||||
_PyPerfTrampoline_Init(config->perf_profiling) < 0) {
|
||||
return _PyStatus_ERR("can't initialize the perf trampoline");
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue