]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Don't double count misses. (GH-100984)
authorMark Shannon <mark@hotpy.org>
Fri, 13 Jan 2023 15:57:39 +0000 (15:57 +0000)
committerGitHub <noreply@github.com>
Fri, 13 Jan 2023 15:57:39 +0000 (15:57 +0000)
Tools/scripts/summarize_stats.py

index 1c8d10f70277279edda5fd3473069d113bf85554..ce25374f3a9a52a93cd2c5635786b3241b34ceb9 100644 (file)
@@ -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