diff options
author | Mark Shannon <mark@hotpy.org> | 2023-10-23 14:49:09 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-10-23 14:49:09 +0100 |
commit | 52e902ccf0178d7a3f26de4bba7922b01c0d4d3c (patch) | |
tree | 1f5924ef032ba13f1115c4c88541d293f6331875 /Python/instrumentation.c | |
parent | 32c37fe1ba708b8290cfa971e130bcfc29f1ead3 (diff) | |
download | cpython-52e902ccf0178d7a3f26de4bba7922b01c0d4d3c.tar.gz cpython-52e902ccf0178d7a3f26de4bba7922b01c0d4d3c.zip |
GH-109369: Add machinery for deoptimizing tier2 executors, both individually and globally. (GH-110384)
Diffstat (limited to 'Python/instrumentation.c')
-rw-r--r-- | Python/instrumentation.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/Python/instrumentation.c b/Python/instrumentation.c index eee1908e503..4bb57a621e3 100644 --- a/Python/instrumentation.c +++ b/Python/instrumentation.c @@ -1582,6 +1582,7 @@ _Py_Instrument(PyCodeObject *code, PyInterpreterState *interp) if (code->co_executors != NULL) { _PyCode_Clear_Executors(code); } + _Py_Executors_InvalidateDependency(interp, code); int code_len = (int)Py_SIZE(code); /* code->_co_firsttraceable >= code_len indicates * that no instrumentation can be inserted. @@ -1803,6 +1804,7 @@ _PyMonitoring_SetEvents(int tool_id, _PyMonitoringEventSet events) return -1; } set_global_version(interp, new_version); + _Py_Executors_InvalidateAll(interp); return instrument_all_executing_code_objects(interp); } @@ -1832,6 +1834,7 @@ _PyMonitoring_SetLocalEvents(PyCodeObject *code, int tool_id, _PyMonitoringEvent /* Force instrumentation update */ code->_co_instrumentation_version -= MONITORING_VERSION_INCREMENT; } + _Py_Executors_InvalidateDependency(interp, code); if (_Py_Instrument(code, interp)) { return -1; } |