diff options
author | Mark Shannon <mark@hotpy.org> | 2022-12-14 15:50:02 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-12-14 15:50:02 (GMT) |
commit | 5693f45b19de47f8cb2f08d3baf43e626d3fbdf3 (patch) | |
tree | c002c2cdddd00c7f30d21fad80a81200b3337e75 /Tools | |
parent | 3192c00a3cf136e06592d9a14d4d7b82412da4de (diff) | |
download | cpython-5693f45b19de47f8cb2f08d3baf43e626d3fbdf3.zip cpython-5693f45b19de47f8cb2f08d3baf43e626d3fbdf3.tar.gz cpython-5693f45b19de47f8cb2f08d3baf43e626d3fbdf3.tar.bz2 |
Assorted minor fixes for specialization stats. (GH-100219)
Diffstat (limited to 'Tools')
-rw-r--r-- | Tools/scripts/summarize_stats.py | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/Tools/scripts/summarize_stats.py b/Tools/scripts/summarize_stats.py index c30a60e..81b06f9 100644 --- a/Tools/scripts/summarize_stats.py +++ b/Tools/scripts/summarize_stats.py @@ -32,7 +32,7 @@ for name in opcode.opname[1:]: opmap = {name: i for i, name in enumerate(opname)} opmap = dict(sorted(opmap.items())) -TOTAL = "specialization.deferred", "specialization.hit", "specialization.miss", "execution_count" +TOTAL = "specialization.hit", "specialization.miss", "execution_count" def format_ratio(num, den): """ @@ -90,7 +90,7 @@ def calculate_specialization_stats(family_stats, total): if key in ("specialization.hit", "specialization.miss"): label = key[len("specialization."):] elif key == "execution_count": - label = "unquickened" + continue elif key in ("specialization.success", "specialization.failure", "specializable"): continue elif key.startswith("pair"): @@ -115,7 +115,7 @@ def calculate_specialization_success_failure(family_stats): def calculate_specialization_failure_kinds(name, family_stats, defines): total_failures = family_stats.get("specialization.failure", 0) - failure_kinds = [ 0 ] * 30 + failure_kinds = [ 0 ] * 40 for key in family_stats: if not key.startswith("specialization.failure_kind"): continue @@ -224,7 +224,7 @@ def pretty(defname): return defname.replace("_", " ").lower() def kind_to_text(kind, defines, opname): - if kind < 7: + if kind <= 7: return pretty(defines[kind][0]) if opname.endswith("ATTR"): opname = "ATTR" @@ -241,10 +241,7 @@ def categorized_counts(opcode_stats): not_specialized = 0 specialized_instructions = { op for op in opcode._specialized_instructions - if "__" not in op and "ADAPTIVE" not in op} - adaptive_instructions = { - op for op in opcode._specialized_instructions - if "ADAPTIVE" in op} + if "__" not in op} for i, opcode_stat in enumerate(opcode_stats): if "execution_count" not in opcode_stat: continue @@ -252,8 +249,6 @@ def categorized_counts(opcode_stats): name = opname[i] if "specializable" in opcode_stat: not_specialized += count - elif name in adaptive_instructions: - not_specialized += count elif name in specialized_instructions: miss = opcode_stat.get("specialization.miss", 0) not_specialized += miss |