diff options
author | Mark Shannon <mark@hotpy.org> | 2022-12-15 09:45:03 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-12-15 09:45:03 (GMT) |
commit | 48e352a2410b6e962d40359939a0d43aaba5ece9 (patch) | |
tree | 8c5ae99d6fabd8848e89afa42172b82a59dbdfdc /Python | |
parent | bdd86741bebd3efb51e540d5148e658cb34fd3ce (diff) | |
download | cpython-48e352a2410b6e962d40359939a0d43aaba5ece9.zip cpython-48e352a2410b6e962d40359939a0d43aaba5ece9.tar.gz cpython-48e352a2410b6e962d40359939a0d43aaba5ece9.tar.bz2 |
Move stats for the method cache into the `Py_STAT` machinery (GH-100255)
Diffstat (limited to 'Python')
-rw-r--r-- | Python/specialize.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/Python/specialize.c b/Python/specialize.c index e88fdde..d1a3845 100644 --- a/Python/specialize.c +++ b/Python/specialize.c @@ -187,6 +187,11 @@ print_object_stats(FILE *out, ObjectStats *stats) fprintf(out, "Object materialize dict (new key): %" PRIu64 "\n", stats->dict_materialized_new_key); fprintf(out, "Object materialize dict (too big): %" PRIu64 "\n", stats->dict_materialized_too_big); fprintf(out, "Object materialize dict (str subclass): %" PRIu64 "\n", stats->dict_materialized_str_subclass); + fprintf(out, "Object method cache hits: %" PRIu64 "\n", stats->type_cache_hits); + fprintf(out, "Object method cache misses: %" PRIu64 "\n", stats->type_cache_misses); + fprintf(out, "Object method cache collisions: %" PRIu64 "\n", stats->type_cache_collisions); + fprintf(out, "Object method cache dunder hits: %" PRIu64 "\n", stats->type_cache_dunder_hits); + fprintf(out, "Object method cache dunder misses: %" PRIu64 "\n", stats->type_cache_dunder_misses); } static void |