gh-115178: Add Counts of UOp Pairs to pystats (GH-115181)

This commit is contained in:
Jeff Glass 2024-04-16 08:27:18 -05:00 committed by GitHub
parent c053d52edd
commit acf69e09c6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 26 additions and 4 deletions

View file

@ -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(),