mirror of
https://github.com/python/cpython.git
synced 2025-10-09 16:34:44 +00:00
gh-114312: Collect stats for unlikely events (GH-114493)
This commit is contained in:
parent
c63c6142f9
commit
ea3cd0498c
11 changed files with 199 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue