diff options
author | mpage <mpage@cs.stanford.edu> | 2024-11-01 16:10:58 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-11-01 23:10:58 +0000 |
commit | f0c6fccd08904787a39269367f09f263d496114c (patch) | |
tree | 1a12e809be9f39c6c668c96b100fbf2a7bbf5c67 /Python/pylifecycle.c | |
parent | 8477951a1c460ff9b7dc7c54e7bf9b66b1722459 (diff) | |
download | cpython-f0c6fccd08904787a39269367f09f263d496114c.tar.gz cpython-f0c6fccd08904787a39269367f09f263d496114c.zip |
gh-126255: Ignore warning about JIT being deactivated when perf support is active in `test_embed.InitConfigTests.test_initconfig_api` (#126302)
Temporarily ignore warnings about JIT deactivation when perf support is active.
This will be reverted as soon as a way is found to determine at run time whether the interpreter was built with JIT. Currently, this is not possible on Windows.
Co-authored-by: Kirill Podoprigora <kirill.bast9@mail.ru>
Co-authored-by: Ken Jin <28750310+Fidget-Spinner@users.noreply.github.com>
Co-authored-by: Pablo Galindo <pablogsal@gmail.com>
Diffstat (limited to 'Python/pylifecycle.c')
-rw-r--r-- | Python/pylifecycle.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/Python/pylifecycle.c b/Python/pylifecycle.c index 2efaa9db7d7..23882d08384 100644 --- a/Python/pylifecycle.c +++ b/Python/pylifecycle.c @@ -1310,12 +1310,17 @@ init_interp_main(PyThreadState *tstate) enabled = *env != '0'; } if (enabled) { +#ifdef _Py_JIT + // perf profiler works fine with tier 2 interpreter, so + // only checking for a "real JIT". if (config->perf_profiling > 0) { (void)PyErr_WarnEx( PyExc_RuntimeWarning, "JIT deactivated as perf profiling support is active", 0); - } else { + } else +#endif + { PyObject *opt = _PyOptimizer_NewUOpOptimizer(); if (opt == NULL) { return _PyStatus_ERR("can't initialize optimizer"); |