diff options
author | Pablo Galindo Salgado <Pablogsal@gmail.com> | 2024-09-27 23:50:16 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-09-27 23:50:16 (GMT) |
commit | 02b49c51501f5eeef3ab5d74fb9eace1151a1359 (patch) | |
tree | d5e9c36d612b2023eeae9089372937c4334eb063 /Programs | |
parent | 425587a110eb214a097c634d4b6d944ac478923e (diff) | |
download | cpython-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.c | 5 |
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; |