mirror of
https://github.com/python/cpython.git
synced 2025-10-06 15:11:58 +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
|
@ -267,6 +267,16 @@ print_optimization_stats(FILE *out, OptimizationStats *stats)
|
|||
}
|
||||
}
|
||||
|
||||
static void
|
||||
print_rare_event_stats(FILE *out, RareEventStats *stats)
|
||||
{
|
||||
fprintf(out, "Rare event (set_class): %" PRIu64 "\n", stats->set_class);
|
||||
fprintf(out, "Rare event (set_bases): %" PRIu64 "\n", stats->set_bases);
|
||||
fprintf(out, "Rare event (set_eval_frame_func): %" PRIu64 "\n", stats->set_eval_frame_func);
|
||||
fprintf(out, "Rare event (builtin_dict): %" PRIu64 "\n", stats->builtin_dict);
|
||||
fprintf(out, "Rare event (func_modification): %" PRIu64 "\n", stats->func_modification);
|
||||
}
|
||||
|
||||
static void
|
||||
print_stats(FILE *out, PyStats *stats)
|
||||
{
|
||||
|
@ -275,6 +285,7 @@ print_stats(FILE *out, PyStats *stats)
|
|||
print_object_stats(out, &stats->object_stats);
|
||||
print_gc_stats(out, stats->gc_stats);
|
||||
print_optimization_stats(out, &stats->optimization_stats);
|
||||
print_rare_event_stats(out, &stats->rare_event_stats);
|
||||
}
|
||||
|
||||
void
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue