mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
gh-122029: Do not unpack method for legacy tracing anymore (#130898)
This commit is contained in:
parent
3569e4a670
commit
8b1edae93a
3 changed files with 22 additions and 13 deletions
|
@ -121,19 +121,6 @@ sys_profile_call_or_return(
|
|||
Py_DECREF(meth);
|
||||
return res;
|
||||
}
|
||||
else if (Py_TYPE(callable) == &PyMethod_Type) {
|
||||
// CALL instruction will grab the function from the method,
|
||||
// so if the function is a C function, the return event will
|
||||
// be emitted. However, CALL event happens before CALL
|
||||
// instruction, so we need to handle this case here.
|
||||
PyObject* func = PyMethod_GET_FUNCTION(callable);
|
||||
if (func == NULL) {
|
||||
return NULL;
|
||||
}
|
||||
if (PyCFunction_Check(func)) {
|
||||
return call_profile_func(self, func);
|
||||
}
|
||||
}
|
||||
Py_RETURN_NONE;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue