summaryrefslogtreecommitdiffstats
path: root/Tools
diff options
context:
space:
mode:
authorJeff Glass <glass.jeffrey@gmail.com>2024-04-16 13:27:18 (GMT)
committerGitHub <noreply@github.com>2024-04-16 13:27:18 (GMT)
commitacf69e09c66f8473399fabab36b81f56496528a6 (patch)
treecdf6f3ae8acc8a84115ff051525f779176aae665 /Tools
parentc053d52edd1e05ccc339e380b705749a3240d645 (diff)
downloadcpython-acf69e09c66f8473399fabab36b81f56496528a6.zip
cpython-acf69e09c66f8473399fabab36b81f56496528a6.tar.gz
cpython-acf69e09c66f8473399fabab36b81f56496528a6.tar.bz2
gh-115178: Add Counts of UOp Pairs to pystats (GH-115181)
Diffstat (limited to 'Tools')
-rw-r--r--Tools/scripts/summarize_stats.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/Tools/scripts/summarize_stats.py b/Tools/scripts/summarize_stats.py
index f7ed98f..ffbc40e 100644
--- a/Tools/scripts/summarize_stats.py
+++ b/Tools/scripts/summarize_stats.py
@@ -736,9 +736,9 @@ def execution_count_section() -> Section:
)
-def pair_count_section() -> Section:
+def pair_count_section(prefix: str, title=None) -> Section:
def calc_pair_count_table(stats: Stats) -> Rows:
- opcode_stats = stats.get_opcode_stats("opcode")
+ opcode_stats = stats.get_opcode_stats(prefix)
pair_counts = opcode_stats.get_pair_counts()
total = opcode_stats.get_total_execution_count()
@@ -760,7 +760,7 @@ def pair_count_section() -> Section:
return Section(
"Pair counts",
- "Pair counts for top 100 Tier 1 instructions",
+ f"Pair counts for top 100 {title if title else prefix} pairs",
[
Table(
("Pair", "Count:", "Self:", "Cumulative:"),
@@ -1232,6 +1232,7 @@ def optimization_section() -> Section:
)
],
)
+ yield pair_count_section(prefix="uop", title="Non-JIT uop")
yield Section(
"Unsupported opcodes",
"",
@@ -1292,7 +1293,7 @@ def meta_stats_section() -> Section:
LAYOUT = [
execution_count_section(),
- pair_count_section(),
+ pair_count_section("opcode"),
pre_succ_pairs_section(),
specialization_section(),
specialization_effectiveness_section(),