summaryrefslogtreecommitdiffstats
path: root/Python/specialize.c
diff options
context:
space:
mode:
authorMark Shannon <mark@hotpy.org>2022-05-27 15:31:41 (GMT)
committerGitHub <noreply@github.com>2022-05-27 15:31:41 (GMT)
commitbbcf42449e13c0b62f145cd49d12674ef3d5bf64 (patch)
tree68d3a84f78de47229c46df66eafd4c27474379a7 /Python/specialize.c
parent8995177030c8b41885ad92b260279b7e622ecaea (diff)
downloadcpython-bbcf42449e13c0b62f145cd49d12674ef3d5bf64.zip
cpython-bbcf42449e13c0b62f145cd49d12674ef3d5bf64.tar.gz
cpython-bbcf42449e13c0b62f145cd49d12674ef3d5bf64.tar.bz2
GH-90230: Add stats to breakdown the origin of calls to `PyEval_EvalFrame` (GH-93284)
Diffstat (limited to 'Python/specialize.c')
-rw-r--r--Python/specialize.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/Python/specialize.c b/Python/specialize.c
index 7148b5d..a2fb460 100644
--- a/Python/specialize.c
+++ b/Python/specialize.c
@@ -176,6 +176,9 @@ print_call_stats(FILE *out, CallStats *stats)
fprintf(out, "Calls to Python functions inlined: %" PRIu64 "\n", stats->inlined_py_calls);
fprintf(out, "Frames pushed: %" PRIu64 "\n", stats->frames_pushed);
fprintf(out, "Frame objects created: %" PRIu64 "\n", stats->frame_objects_created);
+ for (int i = 0; i < EVAL_CALL_KINDS; i++) {
+ fprintf(out, "Calls via PyEval_EvalFrame[%d] : %" PRIu64 "\n", i, stats->eval_calls[i]);
+ }
}
static void
@@ -904,7 +907,7 @@ typedef enum {
MANAGED_DICT = 2,
OFFSET_DICT = 3,
NO_DICT = 4,
- LAZY_DICT = 5,
+ LAZY_DICT = 5,
} ObjectDictKind;
// Please collect stats carefully before and after modifying. A subtle change