8000 GH-90230: Add stats to breakdown the origin of calls to `PyEval_EvalFrame` by markshannon · Pull Request #93284 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

GH-90230: Add stats to breakdown the origin of calls to PyEval_EvalFrame #93284

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 9 commits into from
May 27, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
More tidy up
  • Loading branch information
markshannon committed May 27, 2022
commit a2a2a469300413d841f5318c24b7bfd1eacb1b9e
1 change: 0 additions & 1 deletion Include/internal/pycore_ceval.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ extern "C" {
# error "this header requires Py_BUILD_CORE define"
#endif


/* Forward declarations */
struct pyruntimestate;
struct _ceval_runtime_state;
Expand Down
12 changes: 2 additions & 10 deletions Objects/call.c
Original file line number Diff line number Diff line change
Expand Up @@ -109,11 +109,7 @@ _Py_CheckSlotResult(PyObject *obj, const char *slot_name, int success)
PyObject *
PyObject_CallNoArgs(PyObject *func)
{
#ifdef Py_STATS
if (PyFunction_Check(func)) {
EVAL_CALL_STAT_INC(EVAL_CALL_API);
}
#endif
EVAL_CALL_STAT_INC_IF_FUNCTION(EVAL_CALL_API, func);
PyThreadState *tstate = _PyThreadState_GET();
return _PyObject_VectorcallTstate(tstate, func, NULL, 0, NULL);
}
Expand Down Expand Up @@ -865,11 +861,7 @@ PyObject_VectorcallMethod(PyObject *name, PyObject *const *args,
args++;
nargsf--;
}
#ifdef Py_STATS
if (PyFunction_Check(callable)) {
EVAL_CALL_STAT_INC(EVAL_CALL_METHOD);
}
#endif
EVAL_CALL_STAT_INC_IF_FUNCTION(EVAL_CALL_METHOD, callable);
PyObject *result = _PyObject_VectorcallTstate(tstate, callable,
args, nargsf, kwnames);
Py_DECREF(callable);
Expand Down
0