[Python-checkins] Don't double count misses. (GH-100984)

markshannon webhook-mailer at python.org
Fri Jan 13 10:58:01 EST 2023


https://github.com/python/cpython/commit/c00eb1eae6af3ee5b7e314add4606da4521bb8c5
commit: c00eb1eae6af3ee5b7e314add4606da4521bb8c5
branch: main
author: Mark Shannon <mark at hotpy.org>
committer: markshannon <mark at hotpy.org>
date: 2023-01-13T15:57:39Z
summary:

Don't double count misses. (GH-100984)

files:
M Tools/scripts/summarize_stats.py

diff --git a/Tools/scripts/summarize_stats.py b/Tools/scripts/summarize_stats.py
index 1c8d10f70277..ce25374f3a9a 100644
--- a/Tools/scripts/summarize_stats.py
+++ b/Tools/scripts/summarize_stats.py
@@ -404,6 +404,9 @@ def emit_specialization_overview(opcode_stats, total):
             total = 0
             counts = []
             for i, opcode_stat in enumerate(opcode_stats):
+                # Avoid double counting misses
+                if title == "Misses" and "specializable" in opcode_stat:
+                    continue
                 value = opcode_stat.get(field, 0)
                 counts.append((value, opname[i]))
                 total += value



More information about the Python-checkins mailing list