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

This commit is contained in:
Mark Shannon 2022-05-27 16:31:41 +01:00 committed by GitHub
parent 8995177030
commit bbcf42449e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
13 changed files with 63 additions and 11 deletions

View file

@ -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