gh-114312: Collect stats for unlikely events (GH-114493)

This commit is contained in:
Michael Droettboom 2024-01-25 06:10:51 -05:00 committed by GitHub
parent c63c6142f9
commit ea3cd0498c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
11 changed files with 199 additions and 1 deletions

View file

@ -53,6 +53,15 @@ handle_func_event(PyFunction_WatchEvent event, PyFunctionObject *func,
if (interp->active_func_watchers) {
notify_func_watchers(interp, event, func, new_value);
}
switch (event) {
case PyFunction_EVENT_MODIFY_CODE:
case PyFunction_EVENT_MODIFY_DEFAULTS:
case PyFunction_EVENT_MODIFY_KWDEFAULTS:
RARE_EVENT_INTERP_INC(interp, func_modification);
break;
default:
break;
}
}
int