gh-118518: Allow perf to work without frame pointers (#112254)

This commit is contained in:
Pablo Galindo Salgado 2024-05-05 03:07:29 +02:00 committed by GitHub
parent 999f0c5122
commit 1b22d801b8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
19 changed files with 892 additions and 39 deletions

View file

@ -1703,6 +1703,20 @@ config_init_perf_profiling(PyConfig *config)
if (xoption) {
config->perf_profiling = 1;
}
env = config_get_env(config, "PYTHONPERFJITSUPPORT");
if (env) {
if (_Py_str_to_int(env, &active) != 0) {
active = 0;
}
if (active) {
config->perf_profiling = 2;
}
}
xoption = config_get_xoption(config, L"perfjit");
if (xoption) {
config->perf_profiling = 2;
}
return _PyStatus_OK();
}