summaryrefslogtreecommitdiffstats
path: root/Python/initconfig.c
diff options
context:
space:
mode:
authorPablo Galindo Salgado <Pablogsal@gmail.com>2024-05-05 01:07:29 (GMT)
committerGitHub <noreply@github.com>2024-05-05 01:07:29 (GMT)
commit1b22d801b86ed314c4804b19a1fc4b13484e3cea (patch)
tree9cb5cea113afe83bb1ce106c565396a7bb344691 /Python/initconfig.c
parent999f0c512281995fb61a0d9eda075fd846e8c505 (diff)
downloadcpython-1b22d801b86ed314c4804b19a1fc4b13484e3cea.zip
cpython-1b22d801b86ed314c4804b19a1fc4b13484e3cea.tar.gz
cpython-1b22d801b86ed314c4804b19a1fc4b13484e3cea.tar.bz2
gh-118518: Allow perf to work without frame pointers (#112254)
Diffstat (limited to 'Python/initconfig.c')
-rw-r--r--Python/initconfig.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/Python/initconfig.c b/Python/initconfig.c
index d91a819..1880a28 100644
--- a/Python/initconfig.c
+++ b/Python/initconfig.c
@@ -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();
}