gh-115178: Add Counts of UOp Pairs to pystats (GH-115181)
This commit is contained in:
@@ -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(),
|
||||
|
||||
Reference in New Issue
Block a user