-
-
Notifications
You must be signed in to change notification settings - Fork 32.2k
gh-124855: Don't allow the JIT and perf support to be active at the same time #124856
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
Don't allow the JIT and perf support to be active at the same time. Patch by | ||
Pablo Galindo |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2287,6 +2287,14 @@ sys_activate_stack_trampoline_impl(PyObject *module, const char *backend) | |
/*[clinic end generated code: output=5783cdeb51874b43 input=a12df928758a82b4]*/ | ||
{ | ||
#ifdef PY_HAVE_PERF_TRAMPOLINE | ||
#ifdef _Py_JIT | ||
_PyOptimizerObject* optimizer = _Py_GetOptimizer(); | ||
if (optimizer != NULL) { | ||
PyErr_SetString(PyExc_ValueError, "Cannot activate the perf trampoline if the JIT is active"); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You're forgetting a There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @pablogsal I'm pretty certain there's a refleak here :( There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. On it, sorry I had this on auto-land and I missed your comment :( There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
return NULL; | ||
} | ||
#endif | ||
|
||
if (strcmp(backend, "perf") == 0) { | ||
_PyPerf_Callbacks cur_cb; | ||
_PyPerfTrampoline_GetCallbacks(&cur_cb); | ||
|
Uh oh!
There was an error while loading. Please reload this page.