summaryrefslogtreecommitdiffstats
path: root/Programs
diff options
context:
space:
mode:
authorPablo Galindo Salgado <Pablogsal@gmail.com>2024-09-27 23:50:16 (GMT)
committerGitHub <noreply@github.com>2024-09-27 23:50:16 (GMT)
commit02b49c51501f5eeef3ab5d74fb9eace1151a1359 (patch)
treed5e9c36d612b2023eeae9089372937c4334eb063 /Programs
parent425587a110eb214a097c634d4b6d944ac478923e (diff)
downloadcpython-02b49c51501f5eeef3ab5d74fb9eace1151a1359.zip
cpython-02b49c51501f5eeef3ab5d74fb9eace1151a1359.tar.gz
cpython-02b49c51501f5eeef3ab5d74fb9eace1151a1359.tar.bz2
gh-107954: Fix configuration type for the perf profiler (#124636)
Diffstat (limited to 'Programs')
-rw-r--r--Programs/_testembed.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/Programs/_testembed.c b/Programs/_testembed.c
index 10ee6b7..ab2b2d0 100644
--- a/Programs/_testembed.c
+++ b/Programs/_testembed.c
@@ -810,6 +810,7 @@ static void set_most_env_vars(void)
#ifdef Py_STATS
putenv("PYTHONSTATS=1");
#endif
+ putenv("PYTHONPERFSUPPORT=1");
}
@@ -1844,6 +1845,10 @@ static int test_initconfig_api(void)
goto error;
}
+ if (PyInitConfig_SetInt(config, "perf_profiling", 2) < 0) {
+ goto error;
+ }
+
// Set a UTF-8 string (program_name)
if (PyInitConfig_SetStr(config, "program_name", PROGRAM_NAME_UTF8) < 0) {
goto error;