gh-115168: Add pystats counter for invalidated executors (GH-115169)
This commit is contained in:
committed by
GitHub
parent
96c10c6485
commit
b05afdd5ec
@@ -612,7 +612,7 @@ builtins_dict_watcher(PyDict_WatchEvent event, PyObject *dict, PyObject *key, Py
|
||||
{
|
||||
PyInterpreterState *interp = _PyInterpreterState_GET();
|
||||
if (interp->rare_events.builtin_dict < _Py_MAX_ALLOWED_BUILTINS_MODIFICATIONS) {
|
||||
_Py_Executors_InvalidateAll(interp);
|
||||
_Py_Executors_InvalidateAll(interp, 1);
|
||||
}
|
||||
RARE_EVENT_INTERP_INC(interp, builtin_dict);
|
||||
return 0;
|
||||
@@ -1628,7 +1628,7 @@ finalize_modules(PyThreadState *tstate)
|
||||
PyInterpreterState *interp = tstate->interp;
|
||||
|
||||
// Invalidate all executors and turn off tier 2 optimizer
|
||||
_Py_Executors_InvalidateAll(interp);
|
||||
_Py_Executors_InvalidateAll(interp, 0);
|
||||
_PyOptimizerObject *old = _Py_SetOptimizer(interp, NULL);
|
||||
Py_XDECREF(old);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user