From 836b17c9c3ea313e400e58a75f52b63f96e498bb Mon Sep 17 00:00:00 2001 From: Mark Shannon Date: Tue, 3 May 2022 16:40:24 -0600 Subject: Add more stats for freelist use and allocations. (GH-92211) --- Python/specialize.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'Python/specialize.c') diff --git a/Python/specialize.c b/Python/specialize.c index 9449ac11797..12871ceaf87 100644 --- a/Python/specialize.c +++ b/Python/specialize.c @@ -183,7 +183,12 @@ print_call_stats(FILE *out, CallStats *stats) static void print_object_stats(FILE *out, ObjectStats *stats) { + fprintf(out, "Object allocations from freelist: %" PRIu64 "\n", stats->from_freelist); + fprintf(out, "Object frees to freelist: %" PRIu64 "\n", stats->to_freelist); fprintf(out, "Object allocations: %" PRIu64 "\n", stats->allocations); + fprintf(out, "Object allocations to 512 bytes: %" PRIu64 "\n", stats->allocations512); + fprintf(out, "Object allocations to 4 kbytes: %" PRIu64 "\n", stats->allocations4k); + fprintf(out, "Object allocations over 4 kbytes: %" PRIu64 "\n", stats->allocations_big); fprintf(out, "Object frees: %" PRIu64 "\n", stats->frees); fprintf(out, "Object new values: %" PRIu64 "\n", stats->new_values); fprintf(out, "Object materialize dict (on request): %" PRIu64 "\n", stats->dict_materialized_on_request); -- cgit v1.2.3