mirror of
https://github.com/python/cpython.git
synced 2025-08-22 17:55:18 +00:00
gh-115168: Add pystats counter for invalidated executors (GH-115169)
This commit is contained in:
parent
96c10c6485
commit
b05afdd5ec
11 changed files with 31 additions and 14 deletions
|
@ -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);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue