diff options
author | Michael Droettboom <mdboom@gmail.com> | 2023-10-31 00:02:45 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-10-31 00:02:45 (GMT) |
commit | 84b4533e8446cbff3325fffe939c87f7120a3ffd (patch) | |
tree | dd06a187031f6929c5bf4ba0e49ccac87e5b8ed8 /Python/specialize.c | |
parent | c6fe0869ab1d91525f88279f8567461082c0d3ce (diff) | |
download | cpython-84b4533e8446cbff3325fffe939c87f7120a3ffd.zip cpython-84b4533e8446cbff3325fffe939c87f7120a3ffd.tar.gz cpython-84b4533e8446cbff3325fffe939c87f7120a3ffd.tar.bz2 |
gh-109329: Count tier2 opcode misses (#110561)
This keeps a separate 'miss' counter for each micro-opcode, incremented whenever a guard uop takes a deoptimization side exit.
Diffstat (limited to 'Python/specialize.c')
-rw-r--r-- | Python/specialize.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/Python/specialize.c b/Python/specialize.c index d74c4c5..41e74c6 100644 --- a/Python/specialize.c +++ b/Python/specialize.c @@ -248,6 +248,9 @@ print_optimization_stats(FILE *out, OptimizationStats *stats) if (stats->opcode[i].execution_count) { fprintf(out, "uops[%s].execution_count : %" PRIu64 "\n", names[i], stats->opcode[i].execution_count); } + if (stats->opcode[i].miss) { + fprintf(out, "uops[%s].specialization.miss : %" PRIu64 "\n", names[i], stats->opcode[i].miss); + } } for (int i = 0; i < 256; i++) { |